Skip to content

Commit 00bfd02

Browse files
authored
[DOCS] Clarifies semantic query behavior on sparse and dense vector fields (#111339) (#111355)
* [DOCS] Clarifies semantic query behavior on sparse and dense vector fields. * [DOCS] Adds a NOTE to the semantic query docs.
1 parent 691319e commit 00bfd02

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

docs/reference/mapping/types/semantic-text.asciidoc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,12 @@ In case you want to customize data indexing, use the
121121
<<sparse-vector,`sparse_vector`>> or <<dense-vector,`dense_vector`>> field
122122
types and create an ingest pipeline with an
123123
<<inference-processor, {infer} processor>> to generate the embeddings.
124-
<<semantic-search-inference,This tutorial>> walks you through the process.
124+
<<semantic-search-inference,This tutorial>> walks you through the process. In
125+
these cases - when you use `sparse_vector` or `dense_vector` field types instead
126+
of the `semantic_text` field type to customize indexing - using the
127+
<<query-dsl-semantic-query,`semantic_query`>> is not supported for querying the
128+
field data.
129+
125130

126131
[discrete]
127132
[[update-script]]

docs/reference/query-dsl/semantic-query.asciidoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,10 @@ If you want to fine-tune a search on a `semantic_text` field, you need to know t
128128
You can find the task type using the <<get-inference-api>>, and check the `task_type` associated with the {infer} service.
129129
Depending on the `task_type`, use either the <<query-dsl-sparse-vector-query,`sparse_vector`>> or the <<query-dsl-knn-query,`knn`>> query for greater flexibility and customization.
130130

131+
NOTE: While it is possible to use the `sparse_vector` query or the `knn` query
132+
on a `semantic_text` field, it is not supported to use the `semantic_query` on a
133+
`sparse_vector` or `dense_vector` field type.
134+
131135

132136
[discrete]
133137
[[search-sparse-inference]]

0 commit comments

Comments
 (0)