Hoss, come on, where are you - Filters! ;)

John, filters are handy for situations where you want to run your query 
multiple times against the same sub-set of your indexed documents.  For 
instance, if you have Documents that span several years, and want to be able to 
search individual years, you create a filter for each year, cache it, and run 
the new query against the appropriate year's filter.

Look at the very first line of the very first snippet here (section 5.5.5):
  http://www.lucenebook.com/search?query=filter+cache

Otis


----- Original Message ----
From: John Powers <[EMAIL PROTECTED]>
To: java-user@lucene.apache.org
Sent: Tue 21 Feb 2006 10:31:49 AM EST
Subject: fitler vs query

Hello,

Before I learned about filters in lucene I was building my initial query
as a stringbuffer and then I use that with a queryparser.    Is there
any difference/advantage to separating out the "filter" part of my query
into a proper filter in lucene or does it just add requirements the same
to the query as I am doing (+field:blah AND field:blah)?

--jN


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to