lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <luc...@mikemccandless.com>
Subject Re: Question about Payloads in Lucene 4.5
Date Sat, 22 Mar 2014 09:45:24 GMT
On Sat, Mar 22, 2014 at 5:18 AM, Rohit Banga <iamrohitbanga@gmail.com> wrote:

> Awesome BinaryDocValues sounds nice!
> I saw that NumericDocValues did not inherit from a base class hence I
> thought there is no StringDocValues :).
>
> Can I expect that a searcher manager will invoke
> searcherfactory.newSearcher at most once between searcher manager
> refreshes? I believe IndexSearcher is threadsafe. Is my assumption that
> newSearcher is invoked only once correct?

It's invoked once, for each refresh.

> If BinaryDocValues didn't exist I was thinking of using a custom searcher
> factory which would return an instance of a custom subclass of
> IndexSearcher.This subclass could encapsulate a map from numeric doc value
> to string. I was thinking SearcherManager.acquire could then be used to
> fetch the instance of this subclass while permitting concurrent updates and
> reads to index and HashMap.
> Is using SearcherManager in this way appropriate? Just want to make sure my
> understanding of how SearcherManager works is correct.

I think in theory that would be fine (custom IndexSearcher subclass,
custom map), but hopefully BDV solves this in a simpler way!

Mike McCandless

http://blog.mikemccandless.com

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