lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: Filtering after Query
Date Sun, 18 Dec 2005 20:14:25 GMT

: I have the same problem with HitCollector: I'd need to go through /all/
: documents.

Are you sure about that?  I'm fairly certain that IndexSearcher will never
give your HitCollector a doc to collect unless that doc matches the query.

(Note: i seem to recall that it is possibel you'll be given docids with a
score of 0, since it is theoretically possible for a Query to say a
document matches with a score of 0)

: After playing around a bit, I think I could solve this by adding
: TermQuery's as the last terms to a BooleanQuery, but that would mean I'd
: also have to store certain (security related) values in separate fields
: in the index. I could live with that, if I'm seeing this right: when I

The API for Filters is really designed arround the idea
that the Filter shouldn't know much about the context it's being used in
so that it can be cached and reused (ala CachingWrapperFilter or your own
home grown caching mechamism).  As Paul mentioned, for wthe use you
describe it soudns like using a filter and caching it for as long as your
IndexReader remains open is really the way to go.




-Hoss


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message