Skip to content

Commit

Permalink
Updated LuceneDocument to take advantage of looking up feature values…
Browse files Browse the repository at this point in the history
… on existing features and selecting the max when parsing multi-value sparse vectors
  • Loading branch information
john-wagster committed Jun 4, 2024
1 parent 2f075aa commit 1c03479
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/reference/mapping/types/sparse-vector.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Below is an example of passing in a document with overlapping feature names.
Consider that in this example two categories exist for positive sentiment and negative sentiment.
However, for the purposes of retrieval we also want the overall impact rather than specific sentiment.
In the example `impact` is stored as a multi-value sparse vector and only the max values of overlapping names are stored.
More specifically the final `GET` query here returns a `_score` of ~1.2 (which is the `max(impact.delicious[0], impact.delicious[1]` and is approximate because we have a relative error of 0.4% as explained below)
More specifically the final `GET` query here returns a `_score` of ~1.2 (which is the `max(impact.delicious[0], impact.delicious[1])` and is approximate because we have a relative error of 0.4% as explained below)

[source,console]
--------------------------------
Expand Down

0 comments on commit 1c03479

Please sign in to comment.