gate.creole.annic.apache.lucene.index
Class DocumentWriter
java.lang.Object
gate.creole.annic.apache.lucene.index.DocumentWriter
final class DocumentWriter
- extends Object
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
analyzer
private Analyzer analyzer
directory
private Directory directory
similarity
private Similarity similarity
fieldInfos
private FieldInfos fieldInfos
maxFieldLength
private int maxFieldLength
postingTable
private final Hashtable postingTable
fieldLengths
private int[] fieldLengths
fieldPositions
private int[] fieldPositions
fieldBoosts
private float[] fieldBoosts
termBuffer
private final Term termBuffer
DocumentWriter
DocumentWriter(Directory directory,
Analyzer analyzer,
Similarity similarity,
int maxFieldLength)
- Parameters:
directory - The directory to write the document information toanalyzer - The analyzer to use for the documentsimilarity - The Similarity functionmaxFieldLength - The maximum number of tokens a field may have
addDocument
final void addDocument(String segment,
Document doc)
throws IOException
- Throws:
IOException
invertDocument
private final void invertDocument(Document doc)
throws IOException
- Throws:
IOException
addPosition
private final void addPosition(String field,
String text,
String type,
int position)
sortPostingTable
private final Posting[] sortPostingTable()
quickSort
private static final void quickSort(Posting[] postings,
int lo,
int hi)
writePostings
private final void writePostings(Posting[] postings,
String segment)
throws IOException
- Throws:
IOException
writeNorms
private final void writeNorms(Document doc,
String segment)
throws IOException
- Throws:
IOException