Lucene Architecture
Architecture of Lucene has two parts
- Indexing
- Searching
Document Handler and Response Visualizer are not present in Lucene so they are highlighted in a different color.
Indexing
- Document Handler is the first block, functionality is to extract the content from different sources. It is not present in lucene
- Indexwriter will pass the text stream provided document handler to appropriate analyzer for analyzing the text.
- Analyzer accepts the text stream sent by analyzer and splits the text stream into tokens, send backs the token information to the analyzer, we will see an example in the following slides how the analyzer works.
- Indexwriter will generate an index based on the index's tokens and write indexes to the directory.
Storage
- Directory is the storage location where index data resides physically.
Searching
- Search Request is a place where user searches, request will originate here.
- QueryParser accepts the search text received, and with the help of an analyzer it will parse the text and generate a query.
- Indexsearcher opens the index in read-only mode & searches for text.
- Responses Visualizer is used to displaying the result.
Comments
Post a Comment