| « PreviousNext » | |
![]() ![]() ![]() | Did this page help you? Yes | No | Tell us about it... |
You use the document fields defined in your SDF to populate the fields in your index. Any fields that occur in a document that are not used as a source for at least one index field are ignored and will not be searchable or returnable. Documents can contain a subset of the fields configured for the domain—every document does not have to contain all fields.
A document field can contain multiple values. When all sources are mapped to an index field, the total number of values in the index field cannot exceed 100. At search time, the document is returned as a hit if any of those values match the search query.
Document fields can contain alphanumeric or unsigned integer data. You can map unsigned integer data to a uint index field and use it to construct rank expressions and enable searches within a range of values. You can map alphanumeric data to either text fields or literal fields. A document field can contain up to 1 MB of data.
A uint field contains a 32-bit unsigned integer. If you're mapping timestamps to a uint field, you have to strip off the milliseconds or the timestamp will overflow the uint field. Uint fields are always searchable and can always be returned in search results and used as facets.
A text field contains arbitrary alphanumeric data such as a name, description, or even the entire body of a document. Text fields are always searchable. They are tokenized during indexing and Amazon CloudSearch performs additional text processing on them according to the stopwords, synonyms, and stems you configure in your domain's text options. The contents of a text field can also be returned in search results or the field can be used as a facet, but not both. Amazon CloudSearch can return up to 2 KB of data from a text field—if the field contents exceed 2 KB, only the first 2 KB is included in the results. If a search request does not specify what field to search, by default Amazon CloudSearch searches all text fields. You can control what fields are searched by default by defining your own default search field. For more information, see Configuring Index Fields for an Amazon CloudSearch Domain.
A literal field contains an identifier or other data that you want to be able to match exactly. Unlike text fields, they are not tokenized—Amazon CloudSearch does not perform any text processing on literal fields. Literal fields can be used for fields that have a small set of possible values, as well as for more arbitrary values like email addresses or brand names where an exact match is important. Literal fields are frequently used to enable faceted searches where you want to count the number of exact matches for a particular value.