Question about InternalIndexShard class


(Alexander Reelsen) #1

Heya,

while searching for the leak problem in my fst-suggest plugin I may have
found it - I will do the change in my production system and see what
happens possibly.

In order to get the IndexReader I use for the FSTSuggester I was calling

indexShard.searcher().searcher().getIndexReader()
instead of
indexShard.searcher().reader()

The release of the resources is called on indexShard.searcher().release()
though

so, my question is - why are there two index readers to get? Where is the
difference of those?

Thanks for enlightenment...

--Alexander


(Shay Banon) #2

There isn't a different between the two readers, they are exactly the same.

On Thu, Jul 5, 2012 at 11:32 PM, Alexander Reelsen alr@spinscale.de wrote:

Heya,

while searching for the leak problem in my fst-suggest plugin I may have
found it - I will do the change in my production system and see what
happens possibly.

In order to get the IndexReader I use for the FSTSuggester I was calling

indexShard.searcher().searcher().getIndexReader()
instead of
indexShard.searcher().reader()

The release of the resources is called on indexShard.searcher().release()
though

so, my question is - why are there two index readers to get? Where is the
difference of those?

Thanks for enlightenment...

--Alexander


(system) #3