- Docs
- Cloaked Search
- Usage
- Querying
- Function Score
Function score query
A function_score
query has its query
and functions
analyzed then is simply passed through to the search service. This means that any protected fields contained in the query
or functions
will be converted to protected tokens before being sent to the search service.
Reference the ElasticSearch documentation for a description and configuration options.
Example
JSON{ "query": { "function_score": { "query": { "match_all": {} }, "boost": "5", "functions": [ { "filter": { "match": { "test": "bar" } }, "random_score": {}, "weight": 23 }, { "filter": { "match": { "test": "cat" } }, "weight": 42 } ], "max_boost": 42, "score_mode": "max", "boost_mode": "multiply", "min_score": 42 } } }