public class DateOptions extends Object implements Serializable, Cloneable
Options for a date field. Dates and times are specified in UTC
(Coordinated Universal Time) according to IETF RFC3339:
yyyy-mm-ddT00:00:00Z. Present if IndexFieldType
specifies the field is of type date
. All options are
enabled by default.
Constructor and Description |
---|
DateOptions() |
Modifier and Type | Method and Description |
---|---|
DateOptions |
clone() |
boolean |
equals(Object obj) |
String |
getDefaultValue()
A value to use for the field if the field isn't specified for a
document.
|
Boolean |
getFacetEnabled()
Whether facet information can be returned for the field.
|
Boolean |
getReturnEnabled()
Whether the contents of the field can be returned in the search
results.
|
Boolean |
getSearchEnabled()
Whether the contents of the field are searchable.
|
Boolean |
getSortEnabled()
Whether the field can be used to sort the search results.
|
String |
getSourceField()
A string that represents the name of an index field.
|
int |
hashCode() |
Boolean |
isFacetEnabled()
Whether facet information can be returned for the field.
|
Boolean |
isReturnEnabled()
Whether the contents of the field can be returned in the search
results.
|
Boolean |
isSearchEnabled()
Whether the contents of the field are searchable.
|
Boolean |
isSortEnabled()
Whether the field can be used to sort the search results.
|
void |
setDefaultValue(String defaultValue)
A value to use for the field if the field isn't specified for a
document.
|
void |
setFacetEnabled(Boolean facetEnabled)
Whether facet information can be returned for the field.
|
void |
setReturnEnabled(Boolean returnEnabled)
Whether the contents of the field can be returned in the search
results.
|
void |
setSearchEnabled(Boolean searchEnabled)
Whether the contents of the field are searchable.
|
void |
setSortEnabled(Boolean sortEnabled)
Whether the field can be used to sort the search results.
|
void |
setSourceField(String sourceField)
A string that represents the name of an index field.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
DateOptions |
withDefaultValue(String defaultValue)
A value to use for the field if the field isn't specified for a
document.
|
DateOptions |
withFacetEnabled(Boolean facetEnabled)
Whether facet information can be returned for the field.
|
DateOptions |
withReturnEnabled(Boolean returnEnabled)
Whether the contents of the field can be returned in the search
results.
|
DateOptions |
withSearchEnabled(Boolean searchEnabled)
Whether the contents of the field are searchable.
|
DateOptions |
withSortEnabled(Boolean sortEnabled)
Whether the field can be used to sort the search results.
|
DateOptions |
withSourceField(String sourceField)
A string that represents the name of an index field.
|
public String getDefaultValue()
Constraints:
Length: 0 - 1024
public void setDefaultValue(String defaultValue)
Constraints:
Length: 0 - 1024
defaultValue
- A value to use for the field if the field isn't specified for a
document.public DateOptions withDefaultValue(String defaultValue)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 0 - 1024
defaultValue
- A value to use for the field if the field isn't specified for a
document.public String getSourceField()
Regular field names begin with a letter and can contain the following characters: a-z (lowercase), 0-9, and _ (underscore). Dynamic field names must begin or end with a wildcard (*). The wildcard can also be the only character in a dynamic field name. Multiple wildcards, and wildcards embedded within a string are not supported.
The name score
is reserved and cannot
be used as a field name. To reference a document's ID, you can use the
name _id
.
Constraints:
Length: 1 - 64
Pattern: [a-z][a-z0-9_]*
Regular field names begin with a letter and can contain the following characters: a-z (lowercase), 0-9, and _ (underscore). Dynamic field names must begin or end with a wildcard (*). The wildcard can also be the only character in a dynamic field name. Multiple wildcards, and wildcards embedded within a string are not supported.
The name score
is reserved and cannot
be used as a field name. To reference a document's ID, you can use the
name _id
.
public void setSourceField(String sourceField)
Regular field names begin with a letter and can contain the following characters: a-z (lowercase), 0-9, and _ (underscore). Dynamic field names must begin or end with a wildcard (*). The wildcard can also be the only character in a dynamic field name. Multiple wildcards, and wildcards embedded within a string are not supported.
The name score
is reserved and cannot
be used as a field name. To reference a document's ID, you can use the
name _id
.
Constraints:
Length: 1 - 64
Pattern: [a-z][a-z0-9_]*
sourceField
- A string that represents the name of an index field. CloudSearch
supports regular index fields as well as dynamic fields. A dynamic
field's name defines a pattern that begins or ends with a wildcard.
Any document fields that don't map to a regular index field but do
match a dynamic field's pattern are configured with the dynamic
field's indexing options. Regular field names begin with a letter and can contain the following characters: a-z (lowercase), 0-9, and _ (underscore). Dynamic field names must begin or end with a wildcard (*). The wildcard can also be the only character in a dynamic field name. Multiple wildcards, and wildcards embedded within a string are not supported.
The name score
is reserved and cannot
be used as a field name. To reference a document's ID, you can use the
name _id
.
public DateOptions withSourceField(String sourceField)
Regular field names begin with a letter and can contain the following characters: a-z (lowercase), 0-9, and _ (underscore). Dynamic field names must begin or end with a wildcard (*). The wildcard can also be the only character in a dynamic field name. Multiple wildcards, and wildcards embedded within a string are not supported.
The name score
is reserved and cannot
be used as a field name. To reference a document's ID, you can use the
name _id
.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 64
Pattern: [a-z][a-z0-9_]*
sourceField
- A string that represents the name of an index field. CloudSearch
supports regular index fields as well as dynamic fields. A dynamic
field's name defines a pattern that begins or ends with a wildcard.
Any document fields that don't map to a regular index field but do
match a dynamic field's pattern are configured with the dynamic
field's indexing options. Regular field names begin with a letter and can contain the following characters: a-z (lowercase), 0-9, and _ (underscore). Dynamic field names must begin or end with a wildcard (*). The wildcard can also be the only character in a dynamic field name. Multiple wildcards, and wildcards embedded within a string are not supported.
The name score
is reserved and cannot
be used as a field name. To reference a document's ID, you can use the
name _id
.
public Boolean isFacetEnabled()
public void setFacetEnabled(Boolean facetEnabled)
facetEnabled
- Whether facet information can be returned for the field.public DateOptions withFacetEnabled(Boolean facetEnabled)
Returns a reference to this object so that method calls can be chained together.
facetEnabled
- Whether facet information can be returned for the field.public Boolean getFacetEnabled()
public Boolean isSearchEnabled()
public void setSearchEnabled(Boolean searchEnabled)
searchEnabled
- Whether the contents of the field are searchable.public DateOptions withSearchEnabled(Boolean searchEnabled)
Returns a reference to this object so that method calls can be chained together.
searchEnabled
- Whether the contents of the field are searchable.public Boolean getSearchEnabled()
public Boolean isReturnEnabled()
public void setReturnEnabled(Boolean returnEnabled)
returnEnabled
- Whether the contents of the field can be returned in the search
results.public DateOptions withReturnEnabled(Boolean returnEnabled)
Returns a reference to this object so that method calls can be chained together.
returnEnabled
- Whether the contents of the field can be returned in the search
results.public Boolean getReturnEnabled()
public Boolean isSortEnabled()
public void setSortEnabled(Boolean sortEnabled)
sortEnabled
- Whether the field can be used to sort the search results.public DateOptions withSortEnabled(Boolean sortEnabled)
Returns a reference to this object so that method calls can be chained together.
sortEnabled
- Whether the field can be used to sort the search results.public Boolean getSortEnabled()
public String toString()
toString
in class Object
Object.toString()
public DateOptions clone()
Copyright © 2015. All rights reserved.