Reputation: 1474
I want to know which class in Lucene generates the inverted index?
Thanks
Upvotes: 4
Views: 5270
Reputation: 1474
The inverted index is created in a class named FreqProxTermsWriter
, based on information retrieved from documents, such as term frequency, document frequency, term position etc.
Upvotes: 3
Reputation: 6241
Lets break down some lucene fundamentals
An index contains a sequence of documents.
so Field when added to documents, if they are inverted they are indexed, note that fields can be both indexed and stored
So invert(indexed) operation happens at the field level and yeah Field is a class which is where i think inversion happens
Upvotes: 0
Reputation: 72039
An inverted index is the structure of the data files that Lucene uses. There's not really any particular class that makes it inverted. The classes in the org.apache.lucene.index
package manage the files that ultimately make the data structure an inverted index.
Upvotes: 1