# Accessing Lucene indices in segments

**URL:** <https://discuss.elastic.co/t/accessing-lucene-indices-in-segments/55842>\
**Category:** Elasticsearch\
**Created:** [July 19, 2016, 8:43am UTC](https://discuss.elastic.co/t/accessing-lucene-indices-in-segments/55842 "2016-07-19T08:43:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Abhilash\_Bolla](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/abhilash_bolla/32/26840_2.png) [@Abhilash\_Bolla](https://discuss.elastic.co/u/Abhilash_Bolla)\
**Post date:** [July 19, 2016, 8:43am UTC](https://discuss.elastic.co/t/accessing-lucene-indices-in-segments/55842/1 "2016-07-19T08:43:06Z")

</div>

We know that all the indices, types,etc are stored as lucene indices in segments. The data in /var/lib/elasticsearch/\<cluster\_name\>/nodes/0/indices/\<index\_ name\>/0/index has files with .cfs , .cfe, .pos, .tim, etc extensions for each segment. I want to find out the number of lucene indices in each segment. Can this be used for performance tuning of the cluster?

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [July 19, 2016, 9:12am UTC](https://discuss.elastic.co/t/accessing-lucene-indices-in-segments/55842/2 "2016-07-19T09:12:10Z")

</div>

One shard = one Lucene index.

Yes, you can reduce the number of segment by the force\_merge operation to improve search performance [https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-forcemerge.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-forcemerge.html)

The operation is very expensive and should not be run too frequently.

---

<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 5, 2017, 10:34pm UTC](https://discuss.elastic.co/t/accessing-lucene-indices-in-segments/55842/3 "2017-07-05T22:34:27Z")

</div>


