- Elasticsearch 7.0 Cookbook(Fourth Edition)
- Alberto Paro
- 152字
- 2021-06-24 14:52:12
How it works...
The feature and feature vector are special type fields that are used for storing values that are used mainly in scoring the results.
The values stored in these fields can only be queried using the feature query. This cannot be used in standard query and aggregations.
The value numbers in feature and feature_vector can only be single positive values (multi-values are not allowed).
In the case of feature_vector, the values must be a hash, composed of a string and a positive number value.
There is a flag that changes the behavior of scoring—positive_score_impact. This value is trueby default, but if you want the value of the feature to decrease the score, you can set the false parameter. In the pagerank example, the length of the url reduces the score of the document because the longer the url, the less relevant it becomes.