org.apache.lucene.codecs.blockterms
Class VariableGapTermsIndexWriter
java.lang.Object
org.apache.lucene.codecs.blockterms.TermsIndexWriterBase
org.apache.lucene.codecs.blockterms.VariableGapTermsIndexWriter
- All Implemented Interfaces:
- Closeable
public class VariableGapTermsIndexWriter
- extends TermsIndexWriterBase
Selects index terms according to provided pluggable
VariableGapTermsIndexWriter.IndexTermSelector
, and stores them in a prefix trie that's
loaded entirely in RAM stored as an FST. This terms
index only supports unsigned byte term sort order
(unicode codepoint order when the bytes are UTF8).
- WARNING: This API is experimental and might change in incompatible ways in the next release.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
out
protected final IndexOutput out
VariableGapTermsIndexWriter
public VariableGapTermsIndexWriter(SegmentWriteState state,
VariableGapTermsIndexWriter.IndexTermSelector policy)
throws IOException
- Throws:
IOException
addField
public TermsIndexWriterBase.FieldWriter addField(FieldInfo field,
long termsFilePointer)
throws IOException
- Specified by:
addField
in class TermsIndexWriterBase
- Throws:
IOException
indexedTermPrefixLength
protected int indexedTermPrefixLength(BytesRef priorTerm,
BytesRef indexedTerm)
- NOTE: if your codec does not sort in unicode code
point order, you must override this method, to simply
return indexedTerm.length.
close
public void close()
throws IOException
- Throws:
IOException
Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.