From 999bdd18a7aec5844a488a59a23fc35626c76b22 Mon Sep 17 00:00:00 2001 From: John Wagster Date: Mon, 3 Jun 2024 08:49:12 -0500 Subject: [PATCH] Updated LuceneDocument to take advantage of looking up feature values on existing features and selecting the max when parsing multi-value sparse vectors --- docs/reference/mapping/types/sparse-vector.asciidoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/reference/mapping/types/sparse-vector.asciidoc b/docs/reference/mapping/types/sparse-vector.asciidoc index 7a008bdf8c96a..813492d090b7a 100644 --- a/docs/reference/mapping/types/sparse-vector.asciidoc +++ b/docs/reference/mapping/types/sparse-vector.asciidoc @@ -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. +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] -------------------------------- @@ -89,7 +89,7 @@ GET my-index-000001/_search NOTE: `sparse_vector` fields can not be included in indices that were *created* on {es} versions between 8.0 and 8.10 NOTE: `sparse_vector` fields only support strictly positive values. -negative values will be rejected. +Negative values will be rejected. NOTE: `sparse_vector` fields do not support querying, sorting or aggregating. They may only be used within specialized queries.