lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shawn Heisey <s...@elyograg.org>
Subject Re: A few random questions about solr queries.
Date Fri, 01 Jun 2012 21:50:31 GMT
On 5/29/2012 4:18 AM, santamaria2 wrote:
> *3)* I've rummaged around a bit, looking for info on when to use q vs fq. I
> want to clear my doubts for a certain use case.
>
> Where should my date range queries go? In q or fq? The default settings in
> my site show results from the past 90 days with buttons to show stuff from
> the last month and week as well. But the user is allowed to use a slider to
> apply any date range... this is allowed, but it's not /that/ common.
> I definitely use fq for filtering various tags. Choosing a tag is a common
> activity.

I can't answer your facet questions, but this one I can.  If you are 
using the default relevancy ranking and you do not want the values in a 
given part of your search to affect the score, put it in a filter query 
(fq).  Also, if you are sorting all your search results in a 
deterministic way rather than using relevancy, use a filter query.

If you do want those values to affect the score, which is normal for 
fulltext fields, put your search clause in the regular query (q).  Most 
of the time, a date range is not something that you want to affect the 
relevancy score, so it is a perfect candidate for filter queries.

Thanks,
Shawn


Mime
View raw message