| « PreviousNext » | |
![]() ![]() ![]() | Did this page help you? Yes | No | Tell us about it... |
Topics
By default, search results are ranked according to their relevance to the search request. A document's default text_relevance score takes into account the proximity of the search terms and the frequency of those terms within the document compared to how common the term is across all documents in the domain. To change how search results are ranked, you can:
Use any text or literal field to sort results alphabetically.
Use any uint field to sort results numerically.
Use a custom rank expression to rank results.
To define a rank expression, you construct a numeric expression using uint fields, other
rank expressions, a document's text_relevance score, and numeric operators and
functions. To use a rank expression to customize result ranking, you use the
rank parameter in your search requests to specify the rank expression you
want to use to order the results.
You can also use rank expressions in your search requests to set thresholds for search
results through the t- parameter. FIELD
Rank expressions configured as part of your domain configuration can be referenced in any search request to rank the results, set thresholds for the results, and be returned in the search results. To test and tune rank expressions, you can define and use them directly within search requests. To facilitate tuning, the Amazon CloudSearch console enables you to easily compare how results are ranked using different rank expressions.