public class LazyTextExtractorField
extends org.apache.lucene.document.AbstractField
LazyTextExtractorField
implements a Lucene field with a String
value that is lazily initialized from a given Reader
. In addition
this class provides a method to find out whether the purpose of the reader
is to extract text and whether the extraction process is already finished.isExtractorFinished()
,
Serialized FormConstructor and Description |
---|
LazyTextExtractorField(org.apache.tika.parser.Parser parser,
InternalValue value,
org.apache.tika.metadata.Metadata metadata,
Executor executor,
boolean highlighting,
int maxFieldLength,
boolean withNorms)
Creates a new
LazyTextExtractorField . |
Modifier and Type | Method and Description |
---|---|
byte[] |
binaryValue() |
void |
dispose()
Releases all resources associated with this field.
|
boolean |
isExtractorFinished()
Checks whether the text extraction task has finished.
|
Reader |
readerValue() |
String |
stringValue()
Returns the extracted text.
|
org.apache.lucene.analysis.TokenStream |
tokenStreamValue() |
getBinaryLength, getBinaryOffset, getBinaryValue, getBinaryValue, getBoost, getIndexOptions, getOmitNorms, getOmitTermFreqAndPositions, isBinary, isIndexed, isLazy, isStored, isStoreOffsetWithTermVector, isStorePositionWithTermVector, isTermVectorStored, isTokenized, name, setBoost, setIndexOptions, setOmitNorms, setOmitTermFreqAndPositions, setStoreTermVector, toString
public LazyTextExtractorField(org.apache.tika.parser.Parser parser, InternalValue value, org.apache.tika.metadata.Metadata metadata, Executor executor, boolean highlighting, int maxFieldLength, boolean withNorms)
LazyTextExtractorField
.parser
- value
- metadata
- executor
- highlighting
- set to true
to enable result highlighting supportmaxFieldLength
- withNorms
- public String stringValue()
public Reader readerValue()
null
public byte[] binaryValue()
null
public org.apache.lucene.analysis.TokenStream tokenStreamValue()
null
public boolean isExtractorFinished()
true
if the extracted text is availablepublic void dispose()
Copyright © 2004–2022 The Apache Software Foundation. All rights reserved.