Reputation: 5870
I know for analyzed field, Lucene would tokenized the clause then store the tokens as an inverted index for searching. But how does Lucene index the Not_Analyzed fields, I don't believe it is still a inverted index. Is it BTree or Hash?
Upvotes: 0
Views: 334
Reputation: 217254
Not analyzed fields are also stored in the inverted index the same way analyzed fields are, they are simply... not analyzed. This means the field value will not be tokenized, etc, before being indexed.
So if your not_analyzed
field contains the value New York
, then that value will go unmodified and untokenized in the inverted index and you'll still be able to search for the documents containing that exact value. It's somehow similar to having an analyzed field whose analyzer is a keyword
analyzer
Upvotes: 2