Module org.apache.lucene.suggest
Class WFSTCompletionLookup.WFSTInputIterator
java.lang.Object
org.apache.lucene.search.suggest.SortedInputIterator
org.apache.lucene.search.suggest.fst.WFSTCompletionLookup.WFSTInputIterator
- All Implemented Interfaces:
InputIterator
,BytesRefIterator
- Enclosing class:
WFSTCompletionLookup
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.lucene.search.suggest.InputIterator
InputIterator.InputIteratorWrapper
-
Field Summary
Fields inherited from interface org.apache.lucene.search.suggest.InputIterator
EMPTY
-
Constructor Summary
ConstructorsConstructorDescriptionWFSTInputIterator
(Directory tempDir, String tempFileNamePrefix, InputIterator source) -
Method Summary
Modifier and TypeMethodDescriptionprotected long
decode
(BytesRef scratch, ByteArrayDataInput tmpInput) decodes the weight at the current positionprotected void
encode
(OfflineSorter.ByteSequencesWriter writer, ByteArrayDataOutput output, byte[] buffer, BytesRef spare, BytesRef payload, Set<BytesRef> contexts, long weight) encodes an entry (bytes+(contexts)+(payload)+weight) to the provided writerMethods inherited from class org.apache.lucene.search.suggest.SortedInputIterator
contexts, decodeContexts, decodePayload, hasContexts, hasPayloads, next, payload, weight
-
Constructor Details
-
WFSTInputIterator
WFSTInputIterator(Directory tempDir, String tempFileNamePrefix, InputIterator source) throws IOException - Throws:
IOException
-
-
Method Details
-
encode
protected void encode(OfflineSorter.ByteSequencesWriter writer, ByteArrayDataOutput output, byte[] buffer, BytesRef spare, BytesRef payload, Set<BytesRef> contexts, long weight) throws IOException Description copied from class:SortedInputIterator
encodes an entry (bytes+(contexts)+(payload)+weight) to the provided writer- Overrides:
encode
in classSortedInputIterator
- Throws:
IOException
-
decode
Description copied from class:SortedInputIterator
decodes the weight at the current position- Overrides:
decode
in classSortedInputIterator
-