Did this page help you?

   Yes   No   Tell us about it...

com.amazonaws.services.cloudsearch.model
Class IndexField

java.lang.Object
  extended by com.amazonaws.services.cloudsearch.model.IndexField
All Implemented Interfaces:
Serializable

public class IndexField
extends Object
implements Serializable

Defines a field in the index, including its name, type, and the source of its data. The IndexFieldType indicates which of the options will be present. It is invalid to specify options for a type other than the IndexFieldType .

See Also:
Serialized Form

Constructor Summary
IndexField()
           
 
Method Summary
 boolean equals(Object obj)
           
 String getIndexFieldName()
          The name of a field in the search index.
 String getIndexFieldType()
          The type of field.
 LiteralOptions getLiteralOptions()
          Options for literal field.
 List<SourceAttribute> getSourceAttributes()
          An optional list of source attributes that provide data for this index field.
 TextOptions getTextOptions()
          Options for text field.
 UIntOptions getUIntOptions()
          Options for an unsigned integer field.
 int hashCode()
           
 void setIndexFieldName(String indexFieldName)
          The name of a field in the search index.
 void setIndexFieldType(IndexFieldType indexFieldType)
          The type of field.
 void setIndexFieldType(String indexFieldType)
          The type of field.
 void setLiteralOptions(LiteralOptions literalOptions)
          Options for literal field.
 void setSourceAttributes(Collection<SourceAttribute> sourceAttributes)
          An optional list of source attributes that provide data for this index field.
 void setTextOptions(TextOptions textOptions)
          Options for text field.
 void setUIntOptions(UIntOptions uIntOptions)
          Options for an unsigned integer field.
 String toString()
          Returns a string representation of this object; useful for testing and debugging.
 IndexField withIndexFieldName(String indexFieldName)
          The name of a field in the search index.
 IndexField withIndexFieldType(IndexFieldType indexFieldType)
          The type of field.
 IndexField withIndexFieldType(String indexFieldType)
          The type of field.
 IndexField withLiteralOptions(LiteralOptions literalOptions)
          Options for literal field.
 IndexField withSourceAttributes(Collection<SourceAttribute> sourceAttributes)
          An optional list of source attributes that provide data for this index field.
 IndexField withSourceAttributes(SourceAttribute... sourceAttributes)
          An optional list of source attributes that provide data for this index field.
 IndexField withTextOptions(TextOptions textOptions)
          Options for text field.
 IndexField withUIntOptions(UIntOptions uIntOptions)
          Options for an unsigned integer field.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IndexField

public IndexField()
Method Detail

getIndexFieldName

public String getIndexFieldName()
The name of a field in the search index. Field names must begin with a letter and can contain the following characters: a-z (lowercase), 0-9, and _ (underscore). Uppercase letters and hyphens are not allowed. The names "body", "docid", and "text_relevance" are reserved and cannot be specified as field or rank expression names.

Constraints:
Length: 1 - 64
Pattern: [a-z][a-z0-9_]*

Returns:
The name of a field in the search index. Field names must begin with a letter and can contain the following characters: a-z (lowercase), 0-9, and _ (underscore). Uppercase letters and hyphens are not allowed. The names "body", "docid", and "text_relevance" are reserved and cannot be specified as field or rank expression names.

setIndexFieldName

public void setIndexFieldName(String indexFieldName)
The name of a field in the search index. Field names must begin with a letter and can contain the following characters: a-z (lowercase), 0-9, and _ (underscore). Uppercase letters and hyphens are not allowed. The names "body", "docid", and "text_relevance" are reserved and cannot be specified as field or rank expression names.

Constraints:
Length: 1 - 64
Pattern: [a-z][a-z0-9_]*

Parameters:
indexFieldName - The name of a field in the search index. Field names must begin with a letter and can contain the following characters: a-z (lowercase), 0-9, and _ (underscore). Uppercase letters and hyphens are not allowed. The names "body", "docid", and "text_relevance" are reserved and cannot be specified as field or rank expression names.

withIndexFieldName

public IndexField withIndexFieldName(String indexFieldName)
The name of a field in the search index. Field names must begin with a letter and can contain the following characters: a-z (lowercase), 0-9, and _ (underscore). Uppercase letters and hyphens are not allowed. The names "body", "docid", and "text_relevance" are reserved and cannot be specified as field or rank expression names.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 1 - 64
Pattern: [a-z][a-z0-9_]*

Parameters:
indexFieldName - The name of a field in the search index. Field names must begin with a letter and can contain the following characters: a-z (lowercase), 0-9, and _ (underscore). Uppercase letters and hyphens are not allowed. The names "body", "docid", and "text_relevance" are reserved and cannot be specified as field or rank expression names.
Returns:
A reference to this updated object so that method calls can be chained together.

getIndexFieldType

public String getIndexFieldType()
The type of field. Based on this type, exactly one of the UIntOptions, LiteralOptions or TextOptions must be present.

Constraints:
Allowed Values: uint, literal, text

Returns:
The type of field. Based on this type, exactly one of the UIntOptions, LiteralOptions or TextOptions must be present.
See Also:
IndexFieldType

setIndexFieldType

public void setIndexFieldType(String indexFieldType)
The type of field. Based on this type, exactly one of the UIntOptions, LiteralOptions or TextOptions must be present.

Constraints:
Allowed Values: uint, literal, text

Parameters:
indexFieldType - The type of field. Based on this type, exactly one of the UIntOptions, LiteralOptions or TextOptions must be present.
See Also:
IndexFieldType

withIndexFieldType

public IndexField withIndexFieldType(String indexFieldType)
The type of field. Based on this type, exactly one of the UIntOptions, LiteralOptions or TextOptions must be present.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Allowed Values: uint, literal, text

Parameters:
indexFieldType - The type of field. Based on this type, exactly one of the UIntOptions, LiteralOptions or TextOptions must be present.
Returns:
A reference to this updated object so that method calls can be chained together.
See Also:
IndexFieldType

setIndexFieldType

public void setIndexFieldType(IndexFieldType indexFieldType)
The type of field. Based on this type, exactly one of the UIntOptions, LiteralOptions or TextOptions must be present.

Constraints:
Allowed Values: uint, literal, text

Parameters:
indexFieldType - The type of field. Based on this type, exactly one of the UIntOptions, LiteralOptions or TextOptions must be present.
See Also:
IndexFieldType

withIndexFieldType

public IndexField withIndexFieldType(IndexFieldType indexFieldType)
The type of field. Based on this type, exactly one of the UIntOptions, LiteralOptions or TextOptions must be present.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Allowed Values: uint, literal, text

Parameters:
indexFieldType - The type of field. Based on this type, exactly one of the UIntOptions, LiteralOptions or TextOptions must be present.
Returns:
A reference to this updated object so that method calls can be chained together.
See Also:
IndexFieldType

getUIntOptions

public UIntOptions getUIntOptions()
Options for an unsigned integer field. Present if IndexFieldType specifies the field is of type unsigned integer.

Returns:
Options for an unsigned integer field. Present if IndexFieldType specifies the field is of type unsigned integer.

setUIntOptions

public void setUIntOptions(UIntOptions uIntOptions)
Options for an unsigned integer field. Present if IndexFieldType specifies the field is of type unsigned integer.

Parameters:
uIntOptions - Options for an unsigned integer field. Present if IndexFieldType specifies the field is of type unsigned integer.

withUIntOptions

public IndexField withUIntOptions(UIntOptions uIntOptions)
Options for an unsigned integer field. Present if IndexFieldType specifies the field is of type unsigned integer.

Returns a reference to this object so that method calls can be chained together.

Parameters:
uIntOptions - Options for an unsigned integer field. Present if IndexFieldType specifies the field is of type unsigned integer.
Returns:
A reference to this updated object so that method calls can be chained together.

getLiteralOptions

public LiteralOptions getLiteralOptions()
Options for literal field. Present if IndexFieldType specifies the field is of type literal.

Returns:
Options for literal field. Present if IndexFieldType specifies the field is of type literal.

setLiteralOptions

public void setLiteralOptions(LiteralOptions literalOptions)
Options for literal field. Present if IndexFieldType specifies the field is of type literal.

Parameters:
literalOptions - Options for literal field. Present if IndexFieldType specifies the field is of type literal.

withLiteralOptions

public IndexField withLiteralOptions(LiteralOptions literalOptions)
Options for literal field. Present if IndexFieldType specifies the field is of type literal.

Returns a reference to this object so that method calls can be chained together.

Parameters:
literalOptions - Options for literal field. Present if IndexFieldType specifies the field is of type literal.
Returns:
A reference to this updated object so that method calls can be chained together.

getTextOptions

public TextOptions getTextOptions()
Options for text field. Present if IndexFieldType specifies the field is of type text.

Returns:
Options for text field. Present if IndexFieldType specifies the field is of type text.

setTextOptions

public void setTextOptions(TextOptions textOptions)
Options for text field. Present if IndexFieldType specifies the field is of type text.

Parameters:
textOptions - Options for text field. Present if IndexFieldType specifies the field is of type text.

withTextOptions

public IndexField withTextOptions(TextOptions textOptions)
Options for text field. Present if IndexFieldType specifies the field is of type text.

Returns a reference to this object so that method calls can be chained together.

Parameters:
textOptions - Options for text field. Present if IndexFieldType specifies the field is of type text.
Returns:
A reference to this updated object so that method calls can be chained together.

getSourceAttributes

public List<SourceAttribute> getSourceAttributes()
An optional list of source attributes that provide data for this index field. If not specified, the data is pulled from a source attribute with the same name as this IndexField. When one or more source attributes are specified, an optional data transformation can be applied to the source data when populating the index field. You can configure a maximum of 20 sources for an IndexField.

Returns:
An optional list of source attributes that provide data for this index field. If not specified, the data is pulled from a source attribute with the same name as this IndexField. When one or more source attributes are specified, an optional data transformation can be applied to the source data when populating the index field. You can configure a maximum of 20 sources for an IndexField.

setSourceAttributes

public void setSourceAttributes(Collection<SourceAttribute> sourceAttributes)
An optional list of source attributes that provide data for this index field. If not specified, the data is pulled from a source attribute with the same name as this IndexField. When one or more source attributes are specified, an optional data transformation can be applied to the source data when populating the index field. You can configure a maximum of 20 sources for an IndexField.

Parameters:
sourceAttributes - An optional list of source attributes that provide data for this index field. If not specified, the data is pulled from a source attribute with the same name as this IndexField. When one or more source attributes are specified, an optional data transformation can be applied to the source data when populating the index field. You can configure a maximum of 20 sources for an IndexField.

withSourceAttributes

public IndexField withSourceAttributes(SourceAttribute... sourceAttributes)
An optional list of source attributes that provide data for this index field. If not specified, the data is pulled from a source attribute with the same name as this IndexField. When one or more source attributes are specified, an optional data transformation can be applied to the source data when populating the index field. You can configure a maximum of 20 sources for an IndexField.

Returns a reference to this object so that method calls can be chained together.

Parameters:
sourceAttributes - An optional list of source attributes that provide data for this index field. If not specified, the data is pulled from a source attribute with the same name as this IndexField. When one or more source attributes are specified, an optional data transformation can be applied to the source data when populating the index field. You can configure a maximum of 20 sources for an IndexField.
Returns:
A reference to this updated object so that method calls can be chained together.

withSourceAttributes

public IndexField withSourceAttributes(Collection<SourceAttribute> sourceAttributes)
An optional list of source attributes that provide data for this index field. If not specified, the data is pulled from a source attribute with the same name as this IndexField. When one or more source attributes are specified, an optional data transformation can be applied to the source data when populating the index field. You can configure a maximum of 20 sources for an IndexField.

Returns a reference to this object so that method calls can be chained together.

Parameters:
sourceAttributes - An optional list of source attributes that provide data for this index field. If not specified, the data is pulled from a source attribute with the same name as this IndexField. When one or more source attributes are specified, an optional data transformation can be applied to the source data when populating the index field. You can configure a maximum of 20 sources for an IndexField.
Returns:
A reference to this updated object so that method calls can be chained together.

toString

public String toString()
Returns a string representation of this object; useful for testing and debugging.

Overrides:
toString in class Object
Returns:
A string representation of this object.
See Also:
Object.toString()

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.