public class DocumentSingleFieldConverter extends AbstractSingleTextualConverter<Document,Field>
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
fieldName
The name of the field to extract.
|
Constructor and Description |
---|
DocumentSingleFieldConverter()
Creates a new
DocumentSingleFieldConverter with the body field
as the field to extract. |
DocumentSingleFieldConverter(java.lang.String fieldName)
Creates a new
DocumentSingleFieldConverter with the given field
to extract. |
Modifier and Type | Method and Description |
---|---|
Field |
evaluate(Document input)
Evaluates the function on the given input and returns the output.
|
java.lang.String |
getFieldName()
Gets the name of the field to extract.
|
void |
setFieldName(java.lang.String fieldName)
Sets the name of the field to extract.
|
convert, convertAll
clone
public DocumentSingleFieldConverter()
DocumentSingleFieldConverter
with the body field
as the field to extract.public DocumentSingleFieldConverter(java.lang.String fieldName)
DocumentSingleFieldConverter
with the given field
to extract.fieldName
- The name of the field to extract.public Field evaluate(Document input)
Evaluator
input
- The input to evaluate.public java.lang.String getFieldName()
public void setFieldName(java.lang.String fieldName)
fieldName
- The name of the field to extract.