Class TextOptions
- All Implemented Interfaces:
Serializable
,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.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()
boolean
The name of an analysis scheme for atext
field.A value to use for the field if the field isn't specified for a document.Whether highlights can be returned for the field.Whether the contents of the field can be returned in the search results.Whether the field can be used to sort the search results.int
hashCode()
Whether highlights can be returned for the field.Whether the contents of the field can be returned in the search results.Whether the field can be used to sort the search results.void
setAnalysisScheme
(String analysisScheme) The name of an analysis scheme for atext
field.void
setDefaultValue
(String defaultValue) A value to use for the field if the field isn't specified for a document.void
setHighlightEnabled
(Boolean highlightEnabled) Whether highlights can be returned for the field.void
setReturnEnabled
(Boolean returnEnabled) Whether the contents of the field can be returned in the search results.void
setSortEnabled
(Boolean sortEnabled) Whether the field can be used to sort the search results.void
setSourceField
(String sourceField) toString()
Returns a string representation of this object; useful for testing and debugging.withAnalysisScheme
(String analysisScheme) The name of an analysis scheme for atext
field.withDefaultValue
(String defaultValue) A value to use for the field if the field isn't specified for a document.withHighlightEnabled
(Boolean highlightEnabled) Whether highlights can be returned for the field.withReturnEnabled
(Boolean returnEnabled) Whether the contents of the field can be returned in the search results.withSortEnabled
(Boolean sortEnabled) Whether the field can be used to sort the search results.withSourceField
(String sourceField)
-
Constructor Details
-
TextOptions
public TextOptions()
-
-
Method Details
-
setDefaultValue
A value to use for the field if the field isn't specified for a document.- Parameters:
defaultValue
- A value to use for the field if the field isn't specified for a document.
-
getDefaultValue
A value to use for the field if the field isn't specified for a document.- Returns:
- A value to use for the field if the field isn't specified for a document.
-
withDefaultValue
A value to use for the field if the field isn't specified for a document.- Parameters:
defaultValue
- A value to use for the field if the field isn't specified for a document.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setSourceField
- Parameters:
sourceField
-
-
getSourceField
- Returns:
-
withSourceField
- Parameters:
sourceField
-- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setReturnEnabled
Whether the contents of the field can be returned in the search results.
- Parameters:
returnEnabled
- Whether the contents of the field can be returned in the search results.
-
getReturnEnabled
Whether the contents of the field can be returned in the search results.
- Returns:
- Whether the contents of the field can be returned in the search results.
-
withReturnEnabled
Whether the contents of the field can be returned in the search results.
- Parameters:
returnEnabled
- Whether the contents of the field can be returned in the search results.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
isReturnEnabled
Whether the contents of the field can be returned in the search results.
- Returns:
- Whether the contents of the field can be returned in the search results.
-
setSortEnabled
Whether the field can be used to sort the search results.
- Parameters:
sortEnabled
- Whether the field can be used to sort the search results.
-
getSortEnabled
Whether the field can be used to sort the search results.
- Returns:
- Whether the field can be used to sort the search results.
-
withSortEnabled
Whether the field can be used to sort the search results.
- Parameters:
sortEnabled
- Whether the field can be used to sort the search results.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
isSortEnabled
Whether the field can be used to sort the search results.
- Returns:
- Whether the field can be used to sort the search results.
-
setHighlightEnabled
Whether highlights can be returned for the field.
- Parameters:
highlightEnabled
- Whether highlights can be returned for the field.
-
getHighlightEnabled
Whether highlights can be returned for the field.
- Returns:
- Whether highlights can be returned for the field.
-
withHighlightEnabled
Whether highlights can be returned for the field.
- Parameters:
highlightEnabled
- Whether highlights can be returned for the field.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
isHighlightEnabled
Whether highlights can be returned for the field.
- Returns:
- Whether highlights can be returned for the field.
-
setAnalysisScheme
The name of an analysis scheme for a
text
field.- Parameters:
analysisScheme
- The name of an analysis scheme for atext
field.
-
getAnalysisScheme
The name of an analysis scheme for a
text
field.- Returns:
- The name of an analysis scheme for a
text
field.
-
withAnalysisScheme
The name of an analysis scheme for a
text
field.- Parameters:
analysisScheme
- The name of an analysis scheme for atext
field.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
toString
Returns a string representation of this object; useful for testing and debugging. -
equals
-
hashCode
public int hashCode() -
clone
-