On Sat, Mar 22, 2014 at 5:18 AM, Rohit Banga <iamrohitba...@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-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org

Reply via email to