Changing Bits: Choosing a fast unique identifier (UUID) for Lucene
The purpose of the terms dictionary is to store all unique terms seen during indexing, and map each term to its metadata (docFreq
, totalTermFreq
, etc.), as well as the postings (documents, offsets, postings and payloads). When a term is requested, the terms dictionary must locate it in the on-disk index and return its metadata. The default codec uses the BlockTree terms dictionary, which stores all terms for each field in sorted binary order, and assigns the terms into blocks sharing a common prefix. Each block contains between 25 and 48 terms by default. It uses an in-memory prefix-trie index structure (an FST) to quickly map each prefix to the corresponding on-disk block, and on lookup it first checks the index based on the requested term's prefix, and then seeks to the appropriate on-disk block and scans to find the term.
Read full article from Changing Bits: Choosing a fast unique identifier (UUID) for Lucene
No comments:
Post a Comment