AWS SDK for .NET Documentation
NamedRankExpression Class
AmazonAmazon.CloudSearch_2011_02_01.ModelNamedRankExpression Did this page help you?   Yes   No    Tell us about it...

A named expression that can be evaluated at search time and used for ranking or thresholding in a search query.

Declaration Syntax
C#
public class NamedRankExpression
Members
All MembersConstructorsMethodsProperties



IconMemberDescription
NamedRankExpression()()()()
Initializes a new instance of the NamedRankExpression class

Equals(Object)
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
GetHashCode()()()()
Serves as a hash function for a particular type.
(Inherited from Object.)
GetType()()()()
Gets the type of the current instance.
(Inherited from Object.)
RankExpression
The expression to evaluate for ranking or thresholding while processing a search request. The RankExpression syntax is based on JavaScript expressions and supports:
  • Integer, floating point, hex and octal literals
  • Shortcut evaluation of logical operators such that an expression a || b evaluates to the value a, if a is true, without evaluating b at all
  • JavaScript order of precedence for operators
  • Arithmetic operators: + - * / %
  • Boolean operators (including the ternary operator)
  • Bitwise operators
  • Comparison operators
  • Common mathematic functions: abs ceil erf exp floor lgamma ln log2 log10 max min sqrt pow
  • Trigonometric library functions: acosh acos asinh asin atanh atan cosh cos sinh sin tanh tan
  • Random generation of a number between 0 and 1: rand
  • Current time in epoch: time
  • The min max functions that operate on a variable argument list
Intermediate results are calculated as double precision floating point values. The final return value of a RankExpression is automatically converted from floating point to a 32-bit unsigned integer by rounding to the nearest integer, with a natural floor of 0 and a ceiling of max(uint32_t), 4294967295. Mathematical errors such as dividing by 0 will fail during evaluation and return a value of 0. The source data for a RankExpression can be the name of an IndexField of type uint, another RankExpression or the reserved name text_relevance. The text_relevance source is defined to return an integer from 0 to 1000 (inclusive) to indicate how relevant a document is to the search request, taking into account repetition of search terms in the document and proximity of search terms to each other in each matching IndexField in the document. For more information about using rank expressions to customize ranking, see the Amazon CloudSearch Developer Guide.

Constraints:

Length
1 - 10240


RankName
The name of a rank expression. Rank expression 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_]*


ToString()()()()
Returns a string that represents the current object.
(Inherited from Object.)
WithRankExpression(String) Obsolete.
Sets the RankExpression property

WithRankName(String) Obsolete.
Sets the RankName property

Inheritance Hierarchy
Object
NamedRankExpression

Assembly: AWSSDK (Module: AWSSDK) Version: 1.5.60.0 (1.5.60.0)