Package org.apache.maven.index.updater
Class IndexDataReader
java.lang.Object
org.apache.maven.index.updater.IndexDataReader
An index data reader used to parse transfer index format.
- Author:
- Eugene Kuleshov
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
An index data read result holderstatic interface
Visitor of indexed Lucene documents. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.apache.lucene.document.Document
long
readIndex
(org.apache.lucene.index.IndexWriter w, IndexingContext context) readIndex
(IndexDataReader.IndexDataReadVisitor visitor, IndexingContext context) Reads index content by using a visitor.
-
Constructor Details
-
IndexDataReader
- Throws:
IOException
-
IndexDataReader
- Throws:
IOException
-
-
Method Details
-
readIndex
public IndexDataReader.IndexDataReadResult readIndex(org.apache.lucene.index.IndexWriter w, IndexingContext context) throws IOException - Throws:
IOException
-
readHeader
- Throws:
IOException
-
readDocument
- Throws:
IOException
-
readIndex
public IndexDataReader.IndexDataReadResult readIndex(IndexDataReader.IndexDataReadVisitor visitor, IndexingContext context) throws IOException Reads index content by using a visitor.
The visitor is called for each read documents after it has been populated with Lucene fields.- Parameters:
visitor
- an index data visitorcontext
- indexing context- Returns:
- statistics about read data
- Throws:
IOException
- in case of an IO exception during index file access
-