Lucene Indexing Classes - Lucene

What is Lucene Indexing Classes?

Indexing process is one of the core functionalities provide by Lucerne. The following graph illustrates the indexing process and the apply of classes.

Index Writer is the most important and the middle constituent of the indexing process.
indexing_process

We insert Document(s) contain Field(s) to Index Writer which analyzes the Document(s) using the Analyzer and then create/open/edit indexes as essential and store/update them in a Directory. Index Writer is used to update or create indexes. It is not used to study indexes.

Indexing Classes

Following is a directory of commonly-used classes during the indexing process.

S.No. Class & Description
1 IndexWriter
This class acts as a core component which creates/updates indexes during the indexing process.
2 Directory
This class represents the storage location of the indexes.
3 Analyzer
This class is responsible to analyze a document and get the tokens/words from the text which is to be indexed. Without analysis done, IndexWriter cannot create index.
4 Document
This class represents a virtual document with Fields where the Field is an object which can contain the physical document's contents, its meta data and so on. The Analyzer can understand a Document only.
5 Field
This is the lowest unit or the starting point of the indexing process. It represents the key value pair relationship where a key is used to identify the value to be indexed. Let us assume a field used to represent contents of a document will have key as "contents" and the value may contain the part or all of the text or numeric content of the document. Lucene can index only text or numeric content only.

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Lucene Topics