lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eustache Felenc <eustache.fel...@idilia.com>
Subject Re: Phrase matching with set union as opposed to set intersection on query terms
Date Wed, 05 Jun 2013 18:04:56 GMT
There is also http://wiki.apache.org/solr/SolrRelevancyCookbook with 
nice examples.

On 06/05/2013 12:13 PM, Jack Krupansky wrote:
> "Is there any other documentation that I should review?"
>
> It's in the works! Within a week or two.
>
> -- Jack Krupansky
>
> -----Original Message----- From: Dotan Cohen
> Sent: Wednesday, June 05, 2013 12:06 PM
> To: solr-user@lucene.apache.org
> Subject: Re: Phrase matching with set union as opposed to set 
> intersection on query terms
>
> On Wed, Jun 5, 2013 at 6:10 PM, Shawn Heisey <solr@elyograg.org> wrote:
>> On 6/5/2013 9:03 AM, Dotan Cohen wrote:
>>> How would one write a query which should perform set union on the
>>> search terms (term1 OR term2 OR term3), and yet also perform phrase
>>> matching if both terms are found? I tried a few variants of the
>>> following, but in every case I am getting set intersection on the
>>> search terms:
>>>
>>> select?q={!q.op=OR}text:"term1 term2"~100000
>>
>> A phrase search by definition will require all terms to be present.
>> Even though it is multiple terms, conceptually it is treated as a single
>> term.
>>
>> It sounds like what you are after is what edismax can do.  If you define
>> the pf field in addition to the qf field, Solr will do something pretty
>> amazing - it will automatically construct a phrase query from a
>> non-phrase query and search with it against multiple fields.  Done
>> correctly, this means that an exact match will be listed first in the
>> results.
>>
>> http://wiki.apache.org/solr/ExtendedDisMax#pf_.28Phrase_Fields.29
>>
>> Thanks,
>> Shawn
>>
>
> Thank you Shawn, this pretty much does what I need it to do:
> select?defType=edismax&q={!q.op=OR}search_field:term1 
> term2&pf=search_field
>
> I'm reviewing the Edismax page now. Is there any other documentation
> that I should review? I have found the Edismax page at the wonderful
> lucidworks site, but if there are any other documentation that I
> should review to squeeze the most out of Edismax thenI would love to
> know about it.
> http://docs.lucidworks.com/display/solr/The+Extended+DisMax+Query+Parser
>
> Thank you very much!
>
>
> -- 
> Dotan Cohen
>
> http://gibberish.co.il
> http://what-is-what.com
>


Mime
View raw message