Filters or BooleanQuery

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Filters or BooleanQuery

heybluez
This is more of a design question.  I have a ton of email that is
indexed.  I need to search based on a date range so I use a RangeQuery
added to a BooleanQuery to search.  This works.  Now I need to include
another clause that will narrow the result even more.  AND on top of
that I will need some security applied to the search that will not show
email to those that it does not belong to.

I could easily go through and add query's but I have a feeling I should
use a filter somewhere.  What are the best practices when deciding what
to do?

Thanks,
Michael

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Filters or BooleanQuery

Chris Hostetter-3

: I could easily go through and add query's but I have a feeling I should
: use a filter somewhere.  What are the best practices when deciding what
: to do?

the list archives will have a lot of discussion on this (mainly along the
lines of "should i use a Filter?"  in general the deciding factors should
be...

  1) does the critera in question need to affect scoring -- ie: if you are
searching for new articles with the word "software" and you only want
articles maped to the stock tickers AAPL or IBM, do you care what the term
frequency of the "stockTicker" field is for each document, or what hte
document frequency for those particular tickers are? ... if so a Filter
won't help you.

  2) is the criteria somehting that is reused a lot, and would therfor
make sense to cache independend of the users input -- ie: if a user
is searching for "flash ram" products and they and lots of other users
want to restict to "instock:true" products then a cached Filter could be
really handy.



-Hoss


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]