lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mrw <mikerobertsw...@gmail.com>
Subject Re: Understanding multi-field queries with q and fq
Date Mon, 28 Feb 2011 16:24:10 GMT
Hi, Otis.

I have been playing with dismax (defType=dismax, not qt=dismax -- not sure
about the difference). It looks like eDismax won't be available until Solr
3.1, correct?

We actually have to pass hundreds of Oracle OLS labels in each request for
each user (e.g., Loan Officer can see her customers' data, but VP can see
all customer data).   I've been passing them as an fq parameter, but have
recently learned that's bad, since fq parameters participate in caching.  

We obviously *only* want the label comparisons performed against the label
field. (Those values won't be present in the other search-able fields that
the dismax would run all query parameters against.)

Is there some dismax query magic that would allow us to match the labels in
an uncached manner against only the labels field, but match the user-entered
query against the qf fields?   If not, I think we're stuck with moving the
labels piece to q and the user query to fq and sticking with the standard
handler.


Thanks!



Otis Gospodnetic-2 wrote:
> 
> Hi mrw,
> 
> It sounds like you (e)dismax is what you should look into.  You didn't
> mention 
> it/them, so I'm assuming you're not aware of them.
> 
> See: http://search-lucene.com/?q=dismax+OR+edismax&fc_project=Solr
> 
> Otis
> ----
> Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch
> Lucene ecosystem search :: http://search-lucene.com/
> 
> 
> 
> ----- Original Message ----
>> From: mrw <mikerobertswork@gmail.com>
>> To: solr-user@lucene.apache.org
>> Sent: Fri, February 18, 2011 1:56:24 PM
>> Subject: Understanding multi-field queries with q and fq
>> 
>> 
>> 
>> After searching this list, Google, and looking through the Pugh book, I 
>> am a
>> little confused about the right way to structure a query.
>> 
>> The  Packt book uses the example of the MusicBrainz DB full of song
>> metadata. 
>> What if they also had the song lyrics in English and German as files  on
>> disk, and wanted to index them along with the metadata, so that  each
>> document would basically have song title, artist, publisher, date,  ...,
>> All_Metadata (copy field of all metadata fields), Text_English,  and
>> Text_German fields?  
>> 
>> There can only be one default field,  correct?  So if we want to search
>> for
>> all songs containing (zeppelin AND  (dog OR merle)) do we 
>> 
>> repeat the entire query text for all three major  fields in the 'q'
>> clause
>> (assuming we don't want to use the  cache):
>> 
>> q=(+All_Metadata:zeppelin AND (dog OR  merle)+Text_English:zeppelin AND
>> (dog
>> OR merle)+Text_German:(zeppelin AND  (dog OR merle))
>> 
>> or repeat the entire query text for all three major  fields in the 'fq'
>> clause (assuming we want to use the  cache):
>> 
>> q=*:*&fq=(+All_Metadata:zeppelin AND (dog OR 
>> merle)+Text_English:zeppelin
>> AND (dog OR merle)+Text_German:zeppelin AND (dog  OR merle))
>> 
>> ?
>> 
>> Thanks!
>> 
>> 
>> -- 
>> View this message in  context: 
>>http://lucene.472066.n3.nabble.com/Understanding-multi-field-queries-with-q-and-fq-tp2528866p2528866.html
>>
>> Sent  from the Solr - User mailing list archive at Nabble.com.
>> 
> 
> 


-- 
View this message in context: http://lucene.472066.n3.nabble.com/Understanding-multi-field-queries-with-q-and-fq-tp2528866p2596242.html
Sent from the Solr - User mailing list archive at Nabble.com.

Mime
View raw message