Re: Lucene filter questions

2013-02-25 Thread Wei Wang
Thank you, Mike. I will try it out. On Mon, Feb 25, 2013 at 4:01 PM, Michael McCandless wrote: > On Mon, Feb 25, 2013 at 2:19 PM, Wei Wang wrote: >> Cool. Thanks, Ian. >> >> I will try FieldCacheTermsFilter. >> >> A related question. Occasionally, we would like only use filtering >> conditions i

Re: Lucene filter questions

2013-02-25 Thread Michael McCandless
On Mon, Feb 25, 2013 at 2:19 PM, Wei Wang wrote: > Cool. Thanks, Ian. > > I will try FieldCacheTermsFilter. > > A related question. Occasionally, we would like only use filtering > conditions instead of ranking/scoring. Right now I use > MatchAllDocsQuery with TermsFilter. Based on the code of > M

Re: Lucene filter questions

2013-02-25 Thread Wei Wang
Cool. Thanks, Ian. I will try FieldCacheTermsFilter. A related question. Occasionally, we would like only use filtering conditions instead of ranking/scoring. Right now I use MatchAllDocsQuery with TermsFilter. Based on the code of MatchAllDocsQuery, it seems the class enumerates all doc IDs up t

Re: Lucene filter questions

2013-02-25 Thread Ian Lea
I'm sure that Filters are thread safe. Lucene doesn't have a global caching mechanism as such. But see FieldCache - you might get better performance from FieldCacheTermsFilter than from TermsFilter. See also CachingWrapperFilter and QueryWrapperFilter. -- Ian. On Mon, Feb 25, 2013 at 1:16 AM

Lucene filter questions

2013-02-24 Thread Wei Wang
Hi, I am a Lucene user and I have a few questions about Lucene filters. I appreciate it if someone can shed light on this. 1. Is Lucene filters such as TermsFilter thread-safe in general? The semantics of a Filter is fixed, unless a filter maintains some private state information, theoretical