In elastic search, the data is divided into lucene indexes which in-turn contain several sub-indexes or lucene segments, and each segment could be independently queried.
If we have an index with different field types requiring different datastructures like inverted index for full-text search and BKD trees for numeric data type, how are those indexes stored? Do we have different lucene segment for each field based on the data structure used or does each lucene segment contain multiple data structures (like BKD trees and inverted index) to query different fields effectively?
Each Lucene segment is composed of multiple files having the same name as the segment but different extensions. The whole list of files is available here
However, some systems can frequently run out of file handles, and in those cases, all files can be collapsed into a single "compound" file format with the extension cfs, which contain all other files.