Class FSTOrdsOutputs
- java.lang.Object
-
- org.apache.lucene.util.fst.Outputs<FSTOrdsOutputs.Output>
-
- org.apache.lucene.codecs.blocktreeords.FSTOrdsOutputs
-
final class FSTOrdsOutputs extends Outputs<FSTOrdsOutputs.Output>
A custom FST outputs implementation that stores block data (BytesRef), long ordStart, long numTerms.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFSTOrdsOutputs.Output
-
Field Summary
Fields Modifier and Type Field Description private static BytesRefNO_BYTESstatic FSTOrdsOutputs.OutputNO_OUTPUT
-
Constructor Summary
Constructors Constructor Description FSTOrdsOutputs()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FSTOrdsOutputs.Outputadd(FSTOrdsOutputs.Output prefix, FSTOrdsOutputs.Output output)Eg add("foo", "bar") -> "foobar"FSTOrdsOutputs.Outputcommon(FSTOrdsOutputs.Output output1, FSTOrdsOutputs.Output output2)Eg common("foobar", "food") -> "foo"FSTOrdsOutputs.OutputgetNoOutput()NOTE: this output is compared with == so you must ensure that all methods return the single object if it's really no outputFSTOrdsOutputs.OutputnewOutput(BytesRef bytes, long startOrd, long endOrd)java.lang.StringoutputToString(FSTOrdsOutputs.Output output)longramBytesUsed(FSTOrdsOutputs.Output output)Return memory usage for the provided output.FSTOrdsOutputs.Outputread(DataInput in)Decode an output value previously written withOutputs.write(Object, DataOutput).voidskipFinalOutput(DataInput in)Skip the output previously written withOutputs.writeFinalOutput(T, org.apache.lucene.store.DataOutput); defaults to just callingOutputs.readFinalOutput(org.apache.lucene.store.DataInput)and discarding the result.voidskipOutput(DataInput in)Skip the output; defaults to just callingOutputs.read(org.apache.lucene.store.DataInput)and discarding the result.FSTOrdsOutputs.Outputsubtract(FSTOrdsOutputs.Output output, FSTOrdsOutputs.Output inc)Eg subtract("foobar", "foo") -> "bar"voidwrite(FSTOrdsOutputs.Output prefix, DataOutput out)Encode an output value into aDataOutput.-
Methods inherited from class org.apache.lucene.util.fst.Outputs
merge, readFinalOutput, writeFinalOutput
-
-
-
-
Field Detail
-
NO_OUTPUT
public static final FSTOrdsOutputs.Output NO_OUTPUT
-
NO_BYTES
private static final BytesRef NO_BYTES
-
-
Method Detail
-
common
public FSTOrdsOutputs.Output common(FSTOrdsOutputs.Output output1, FSTOrdsOutputs.Output output2)
Description copied from class:OutputsEg common("foobar", "food") -> "foo"- Specified by:
commonin classOutputs<FSTOrdsOutputs.Output>
-
subtract
public FSTOrdsOutputs.Output subtract(FSTOrdsOutputs.Output output, FSTOrdsOutputs.Output inc)
Description copied from class:OutputsEg subtract("foobar", "foo") -> "bar"- Specified by:
subtractin classOutputs<FSTOrdsOutputs.Output>
-
add
public FSTOrdsOutputs.Output add(FSTOrdsOutputs.Output prefix, FSTOrdsOutputs.Output output)
Description copied from class:OutputsEg add("foo", "bar") -> "foobar"- Specified by:
addin classOutputs<FSTOrdsOutputs.Output>
-
write
public void write(FSTOrdsOutputs.Output prefix, DataOutput out) throws java.io.IOException
Description copied from class:OutputsEncode an output value into aDataOutput.- Specified by:
writein classOutputs<FSTOrdsOutputs.Output>- Throws:
java.io.IOException
-
read
public FSTOrdsOutputs.Output read(DataInput in) throws java.io.IOException
Description copied from class:OutputsDecode an output value previously written withOutputs.write(Object, DataOutput).- Specified by:
readin classOutputs<FSTOrdsOutputs.Output>- Throws:
java.io.IOException
-
skipOutput
public void skipOutput(DataInput in) throws java.io.IOException
Description copied from class:OutputsSkip the output; defaults to just callingOutputs.read(org.apache.lucene.store.DataInput)and discarding the result.- Overrides:
skipOutputin classOutputs<FSTOrdsOutputs.Output>- Throws:
java.io.IOException
-
skipFinalOutput
public void skipFinalOutput(DataInput in) throws java.io.IOException
Description copied from class:OutputsSkip the output previously written withOutputs.writeFinalOutput(T, org.apache.lucene.store.DataOutput); defaults to just callingOutputs.readFinalOutput(org.apache.lucene.store.DataInput)and discarding the result.- Overrides:
skipFinalOutputin classOutputs<FSTOrdsOutputs.Output>- Throws:
java.io.IOException
-
getNoOutput
public FSTOrdsOutputs.Output getNoOutput()
Description copied from class:OutputsNOTE: this output is compared with == so you must ensure that all methods return the single object if it's really no output- Specified by:
getNoOutputin classOutputs<FSTOrdsOutputs.Output>
-
outputToString
public java.lang.String outputToString(FSTOrdsOutputs.Output output)
- Specified by:
outputToStringin classOutputs<FSTOrdsOutputs.Output>
-
newOutput
public FSTOrdsOutputs.Output newOutput(BytesRef bytes, long startOrd, long endOrd)
-
ramBytesUsed
public long ramBytesUsed(FSTOrdsOutputs.Output output)
Description copied from class:OutputsReturn memory usage for the provided output.- Specified by:
ramBytesUsedin classOutputs<FSTOrdsOutputs.Output>- See Also:
Accountable
-
-