lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <erik.hatc...@gmail.com>
Subject Re: filter query parsing problem
Date Wed, 20 Jan 2010 14:37:55 GMT

On Jan 20, 2010, at 9:34 AM, Shalin Shekhar Mangar wrote:

> On Wed, Jan 20, 2010 at 7:40 PM, Erik Hatcher  
> <erik.hatcher@gmail.com>wrote:
>
>>
>> On Jan 20, 2010, at 8:11 AM, Ahmet Arslan wrote:
>>
>> If they are really filter queries i.e. specified through
>>>> "fq" then they will
>>>> not be run through an analyzer.
>>>>
>>>>
>>> Does this mean filter queries are not analyzed? The query below  
>>> returns a
>>> document.
>>>
>>>
>>> http://localhost:8983/solr/select/?q=*%3A*&version=2.2&start=0&rows=10&indent=on&debugQuery=on&fq=features:GOOD
>>>
>>> Am I missing something?
>>>
>>
>> filter queries are query parsed using the  
>> "lucene" (SolrQueryParser) query
>> parser (and appropriate pieces analyzed per field type  
>> configuration).  So
>> the above statement that filter queries are not analyzed is  
>> incorrect.
>>
>>
> Wow! I learned something new today. I guess that using fq for  
> drilling down
> on facets all this time, I somehow came to believe that a filter  
> query is
> not analyzed. Moreover, I've been responsible for misleading quite a  
> few
> people on this forum regarding this topic. Thanks Ahmet for  
> challenging me
> and Erik for the authoritative word :)
>
> /me goes off to fix the wiki

:)

It's most common that fq's are used to drill into facets, which are  
themselves most often indexed as "string" type.  So, an  
fq=category:"Music and Electronics" is not really "analyzed" per se.   
But, in general that is a Lucene query expression.  I actually really  
strongly recommend folks use <fq={!raw f=category}Music and  
Electronics> so that query parsing and analysis and such don't  
interfere when it is really meant to be a straight TermQuery.

	Erik


Mime
View raw message