# Question about InternalIndexShard class

**URL:** <https://discuss.elastic.co/t/question-about-internalindexshard-class/8334>\
**Category:** Elasticsearch\
**Created:** [July 5, 2012, 9:32pm UTC](https://discuss.elastic.co/t/question-about-internalindexshard-class/8334 "2012-07-05T21:32:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [July 5, 2012, 9:32pm UTC](https://discuss.elastic.co/t/question-about-internalindexshard-class/8334/1 "2012-07-05T21:32:30Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [July 5, 2012, 10:45pm UTC](https://discuss.elastic.co/t/question-about-internalindexshard-class/8334/2 "2012-07-05T22:45:51Z")

</div>

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](mailto: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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 3:21am UTC](https://discuss.elastic.co/t/question-about-internalindexshard-class/8334/3 "2017-07-06T03:21:20Z")

</div>

Closed on July 6, 2017, 3:21am UTC


