# Term Index Interval

**URL:** <https://discuss.elastic.co/t/term-index-interval/5304>\
**Category:** Elasticsearch\
**Created:** [September 2, 2011, 3:50pm UTC](https://discuss.elastic.co/t/term-index-interval/5304 "2011-09-02T15:50:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![phobos182](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/phobos182/32/3011_2.png) [@phobos182](https://discuss.elastic.co/u/phobos182)\
**Post date:** [September 2, 2011, 3:50pm UTC](https://discuss.elastic.co/t/term-index-interval/5304/1 "2011-09-02T15:50:52Z")

</div>

I have an ES cluster that I am working on setting up. The total index size for all shards will be about 7-12 Billion documents. I'm investigating the trade offs between memory, and search performance. What would be a good setting for term\_index\_interval for this type of cluster?

I have about 12-15 fields per "type", and about 12 different types. I have tried setting the index interval to 1024, but then queries take seconds to return.

Any advice?

Thanks.

---

<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:** [September 6, 2011, 6:56pm UTC](https://discuss.elastic.co/t/term-index-interval/5304/2 "2011-09-06T18:56:14Z")

</div>

You have two types of settings: index.term\_index\_interval (defaults to 128),  
and index.term\_index\_divisor (defaults to 1). Multiplying the two controls  
how many terms are loaded into memory to improve search time. Lower values  
provides better search response, at the expense of more memory used.

index.term\_index\_interval applies when indexing, you can change that  
dynamically, but it will only apply to new documents indexed.  
index.term\_index\_divisor can be changed dynamically and applies immediately.

Lower values for index.term\_index\_interval also control the size of the  
index on disk.

Now that we have that out of the way, I think that what you should do is  
test..., its hard to give performance recommendations. Sadly, one thing that  
would have helped is understanding the amount of memory used for this in  
memory term index, but thats not exposed in Lucene (I have a patch somewhere  
that tried exposes it, but its quite old).

-shay.banon

On Fri, Sep 2, 2011 at 6:50 PM, phobos182 [phobos182@gmail.com](mailto:phobos182@gmail.com) wrote:

> I have an ES cluster that I am working on setting up. The total index size  
> for all shards will be about 7-12 Billion documents. I'm investigating the  
> trade offs between memory, and search performance. What would be a good  
> setting for term\_index\_interval for this type of cluster?
> 
> I have about 12-15 fields per "type", and about 12 different types. I have  
> tried setting the index interval to 1024, but then queries take seconds to  
> return.
> 
> Any advice?
> 
> Thanks.
> 
> --  
> View this message in context:  
> [http://elasticsearch-users.115913.n3.nabble.com/Term-Index-Interval-tp3304622p3304622.html](http://elasticsearch-users.115913.n3.nabble.com/Term-Index-Interval-tp3304622p3304622.html)  
> Sent from the Elasticsearch Users mailing list archive at [Nabble.com](http://Nabble.com).

---

<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:55am UTC](https://discuss.elastic.co/t/term-index-interval/5304/3 "2017-07-06T03:55:08Z")

</div>


