Home > Mobile >  What is elasticsearch index , Lucene index and inverted index
What is elasticsearch index , Lucene index and inverted index

Time:04-12

Sometime i got confused between lucene index vs inverted index.From my knowledge inverted index contains individual tokens and elasticsearch index include shards. Then what is lucene index what does it contains ?

CodePudding user response:

Elasticsearch index consist of Shards(Lucene index) and Lucene index consists of inverted index(which consists of individual tokens), below terms can be used interchangeably.

Elasticsearch shards = Lucene index

Elasticsearch is based on Lucene, and every Elasticsearch shard is a full blown lucene index, there is no concept of shards in the Luence. Unlike ES index, Lucene index can't be distributed to multiple nodes, and Elasticsearch index distributed to multiple nodes simply means its shards(Lucene index) distributed to multiple nodes.

Index and shards are just the logical names, and actual data is stored in the lucene segments.

P.S: There are several articles on ES sites explaining index, shards and segments in the more details, which would be difficult to cover and would be duplicated here.

  • Related