WARNING: The 2.x versions of Elasticsearch have passed their EOL dates. If you are running a 2.x version, we strongly advise you to upgrade.
This documentation is no longer maintained and may be removed. For the latest information, see the current Elasticsearch documentation.
price clause is a little trickier. The user’s preferred price is
anything up to £100, but this example sets the origin to £50. Prices can’t be
negative, but the lower they are, the better. Really, any price between £0 and
£100 should be considered optimal.
If we were to set the
origin to £100, then prices below £100 would receive a
lower score. Instead, we set both the
origin and the
offset to £50. That
way, the score decays only for any prices above £100 (
origin + offset).
weight parameter can be used to increase or decrease the contribution of
individual clauses. The
weight, which defaults to
1.0, is multiplied by
the score from each clause before the scores are combined with the specified