# When are inverted indexes generated

**URL:** <https://discuss.elastic.co/t/when-are-inverted-indexes-generated/121562>\
**Category:** Elasticsearch\
**Created:** [February 26, 2018, 8:19pm UTC](https://discuss.elastic.co/t/when-are-inverted-indexes-generated/121562 "2018-02-26T20:19:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mvienne](https://avatars.discourse-cdn.com/v4/letter/m/cab0a1/32.png) [@mvienne](https://discuss.elastic.co/u/mvienne)\
**Post date:** [February 26, 2018, 8:19pm UTC](https://discuss.elastic.co/t/when-are-inverted-indexes-generated/121562/1 "2018-02-26T20:19:40Z")

</div>

When are inverted indexes used by Elasticsearch to reply efficiently to search queries generated ? Is it at index time, or are they generated on the go from doc values ? Are they stored on the disk as well ?

---

<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:** [February 27, 2018, 1:08pm UTC](https://discuss.elastic.co/t/when-are-inverted-indexes-generated/121562/2 "2018-02-27T13:08:58Z")

</div>

They are generated at index time (doc values are also generated at index time), and they are also stored on disk.

Elasticsearch uses Apache Lucene for storing and search, and you might want to check out their documentation for more information.

See [https://lucene.apache.org/core/7\_2\_1/index.html](https://lucene.apache.org/core/7_2_1/index.html)

---

<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:** [March 27, 2018, 1:09pm UTC](https://discuss.elastic.co/t/when-are-inverted-indexes-generated/121562/3 "2018-03-27T13:09:10Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
