diff --git a/en/reference/querying/yql.html b/en/reference/querying/yql.html index a3ebb5d910..b12a4d61af 100644 --- a/en/reference/querying/yql.html +++ b/en/reference/querying/yql.html @@ -448,40 +448,24 @@
- Use alternatives to provide alternative terms, with an exactness score, to improve recall.
- Think of it like a special case of the or operator.
-
+ The alternatives operator is used to provide multiple variants of a token at the same
+ position in the query. The token alternatives are given with a normalized exactness score denoting the extent to
+ which they mean "the same thing" as the first alternative.
+
where fieldName contains alternatives({"sneakers":1.0, "shoes":0.7})
+
- In alternatives({"sneakers":1.0, "shoes":0.7}), each number is an exactness score for that specific word form,
- not a term weight in the usual boosting sense:
+ The query will match documents containing any of the alternatives given. The exactness score is reflected
+ in some rank features, such that it is possible to rank more exact matches over less exact ones.
+ Use 1.0 as the exactness of all alternatives if exactness information is not available or appropriate.
- Typical use case: query rewriting/stemming,
- where you search for both the literal user term and a stemmed/synonym form,
- but want the literal form to rank higher.
- E.g. alternatives({"sneakers":1.0, "shoes":0.7})‚ either matches,
- but a document matching "sneakers" literally ranks above one that only matched via the stem "shoes".
+ Prefer alternatives to equiv when the purpose is to express alternative forms of a single token.