public class TextOptions
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
Options for text field. Present if IndexFieldType
specifies the
field is of type text
. A text
field is always
searchable. All options are enabled by default.
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
analysisScheme
The name of an analysis scheme for a
text field. |
private java.lang.String |
defaultValue
A value to use for the field if the field isn't specified for a document.
|
private java.lang.Boolean |
highlightEnabled
Whether highlights can be returned for the field.
|
private java.lang.Boolean |
returnEnabled
Whether the contents of the field can be returned in the search results.
|
private java.lang.Boolean |
sortEnabled
Whether the field can be used to sort the search results.
|
private java.lang.String |
sourceField |
Constructor and Description |
---|
TextOptions() |
Modifier and Type | Method and Description |
---|---|
TextOptions |
clone() |
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getAnalysisScheme()
The name of an analysis scheme for a
text field. |
java.lang.String |
getDefaultValue()
A value to use for the field if the field isn't specified for a document.
|
java.lang.Boolean |
getHighlightEnabled()
Whether highlights can be returned for the field.
|
java.lang.Boolean |
getReturnEnabled()
Whether the contents of the field can be returned in the search results.
|
java.lang.Boolean |
getSortEnabled()
Whether the field can be used to sort the search results.
|
java.lang.String |
getSourceField() |
int |
hashCode() |
java.lang.Boolean |
isHighlightEnabled()
Whether highlights can be returned for the field.
|
java.lang.Boolean |
isReturnEnabled()
Whether the contents of the field can be returned in the search results.
|
java.lang.Boolean |
isSortEnabled()
Whether the field can be used to sort the search results.
|
void |
setAnalysisScheme(java.lang.String analysisScheme)
The name of an analysis scheme for a
text field. |
void |
setDefaultValue(java.lang.String defaultValue)
A value to use for the field if the field isn't specified for a document.
|
void |
setHighlightEnabled(java.lang.Boolean highlightEnabled)
Whether highlights can be returned for the field.
|
void |
setReturnEnabled(java.lang.Boolean returnEnabled)
Whether the contents of the field can be returned in the search results.
|
void |
setSortEnabled(java.lang.Boolean sortEnabled)
Whether the field can be used to sort the search results.
|
void |
setSourceField(java.lang.String sourceField) |
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
TextOptions |
withAnalysisScheme(java.lang.String analysisScheme)
The name of an analysis scheme for a
text field. |
TextOptions |
withDefaultValue(java.lang.String defaultValue)
A value to use for the field if the field isn't specified for a document.
|
TextOptions |
withHighlightEnabled(java.lang.Boolean highlightEnabled)
Whether highlights can be returned for the field.
|
TextOptions |
withReturnEnabled(java.lang.Boolean returnEnabled)
Whether the contents of the field can be returned in the search results.
|
TextOptions |
withSortEnabled(java.lang.Boolean sortEnabled)
Whether the field can be used to sort the search results.
|
TextOptions |
withSourceField(java.lang.String sourceField) |
private java.lang.String defaultValue
private java.lang.String sourceField
private java.lang.Boolean returnEnabled
Whether the contents of the field can be returned in the search results.
private java.lang.Boolean sortEnabled
Whether the field can be used to sort the search results.
private java.lang.Boolean highlightEnabled
Whether highlights can be returned for the field.
private java.lang.String analysisScheme
The name of an analysis scheme for a text
field.
public void setDefaultValue(java.lang.String defaultValue)
defaultValue
- A value to use for the field if the field isn't specified for a
document.public java.lang.String getDefaultValue()
public TextOptions withDefaultValue(java.lang.String defaultValue)
defaultValue
- A value to use for the field if the field isn't specified for a
document.public void setSourceField(java.lang.String sourceField)
sourceField
- public java.lang.String getSourceField()
public TextOptions withSourceField(java.lang.String sourceField)
sourceField
- public void setReturnEnabled(java.lang.Boolean returnEnabled)
Whether the contents of the field can be returned in the search results.
returnEnabled
- Whether the contents of the field can be returned in the search
results.public java.lang.Boolean getReturnEnabled()
Whether the contents of the field can be returned in the search results.
public TextOptions withReturnEnabled(java.lang.Boolean returnEnabled)
Whether the contents of the field can be returned in the search results.
returnEnabled
- Whether the contents of the field can be returned in the search
results.public java.lang.Boolean isReturnEnabled()
Whether the contents of the field can be returned in the search results.
public void setSortEnabled(java.lang.Boolean sortEnabled)
Whether the field can be used to sort the search results.
sortEnabled
- Whether the field can be used to sort the search results.public java.lang.Boolean getSortEnabled()
Whether the field can be used to sort the search results.
public TextOptions withSortEnabled(java.lang.Boolean sortEnabled)
Whether the field can be used to sort the search results.
sortEnabled
- Whether the field can be used to sort the search results.public java.lang.Boolean isSortEnabled()
Whether the field can be used to sort the search results.
public void setHighlightEnabled(java.lang.Boolean highlightEnabled)
Whether highlights can be returned for the field.
highlightEnabled
- Whether highlights can be returned for the field.public java.lang.Boolean getHighlightEnabled()
Whether highlights can be returned for the field.
public TextOptions withHighlightEnabled(java.lang.Boolean highlightEnabled)
Whether highlights can be returned for the field.
highlightEnabled
- Whether highlights can be returned for the field.public java.lang.Boolean isHighlightEnabled()
Whether highlights can be returned for the field.
public void setAnalysisScheme(java.lang.String analysisScheme)
The name of an analysis scheme for a text
field.
analysisScheme
- The name of an analysis scheme for a text
field.public java.lang.String getAnalysisScheme()
The name of an analysis scheme for a text
field.
text
field.public TextOptions withAnalysisScheme(java.lang.String analysisScheme)
The name of an analysis scheme for a text
field.
analysisScheme
- The name of an analysis scheme for a text
field.public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public TextOptions clone()
clone
in class java.lang.Object