You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Index time boost in the _all field is currently done via payload. For each token/position we encode a float in the payload that is used at query time to influence the score of the query. The boost value is extracted from the mapping at index time when the value of a field is copied into _all.
For instance:
when querying the _all field, words that originated from the title field will have their score multiplied by 3.5. Unfortunately you cannot change this value without reindexing your data.
Proposal
Now that the dynamic boost at index time is prohibited (only field boost mapping is allowed) we could investigate an hybrid approach where instead of directly encoding a boost value in the payload we would encode a small number that refers to a class of score.
Suppose you have 3 fields in your mapping and you want to be able to score them differently in the _all fields. By assigning 3 classes of score (0, 1, 2) it is easy to remap those classes at query time into different boost values.
For instance a query with index time boost could look like this:
Yes especially because the boost parameter of the field can be use for query time boosting of the field itself (and not _all field) so it's kind of confusing. The key point is that we need to assign a small unique id to the field when we add it to the _all field so that the payload's encoding stays small. The tricky part is that this unique id cannot be automatically computed for dynamic fields. If it's in the _all field configuration then it's easy to assign one each time the configuration is updated.
Could be something like:
"_all": {
"payload_fields": ["text", "title"]
}
... but I'll need to find a better name for "payload_field" ;)
Index time boost in the _all field is currently done via payload. For each token/position we encode a float in the payload that is used at query time to influence the score of the query. The boost value is extracted from the mapping at index time when the value of a field is copied into _all.
For instance:
when querying the
_all
field, words that originated from thetitle
field will have their score multiplied by 3.5. Unfortunately you cannot change this value without reindexing your data.Proposal
Now that the dynamic boost at index time is prohibited (only field boost mapping is allowed) we could investigate an hybrid approach where instead of directly encoding a boost value in the payload we would encode a small number that refers to a class of score.
Suppose you have 3 fields in your mapping and you want to be able to score them differently in the _all fields. By assigning 3 classes of score (0, 1, 2) it is easy to remap those classes at query time into different boost values.
For instance a query with index time boost could look like this:
The text was updated successfully, but these errors were encountered: