lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ian Lea <ian....@gmail.com>
Subject Re: Lucene filter questions
Date Mon, 25 Feb 2013 10:17:59 GMT
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, Wei Wang <welshwang@gmail.com> wrote:
> 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, theoretically it could be thread-safe and
> the same Filter can be used by multiple queries at the same time.
>
> 2. Does Lucene has a global Caching mechanism for filters or even
> queries? Or a user has to manage them by himself?
>     It probably can better use resource if the cached filters/queries
> are managed at a central place. I noticed FilterManager was removed
> from Lucene 4. Is there another class replacing FilterManager?
>
> Thanks!
> Wei
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>

---------------------------------------------------------------------
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