|
@@ -11,7 +11,8 @@ This can be achieved with one of two strategies:
|
|
- Using an {nlp} model to convert query text into a list of token-weight pairs
|
|
- Using an {nlp} model to convert query text into a list of token-weight pairs
|
|
- Sending in precalculated token-weight pairs as query vectors
|
|
- Sending in precalculated token-weight pairs as query vectors
|
|
|
|
|
|
-These token-weight pairs are then used in a query against a <<sparse-vector,sparse vector>>.
|
|
|
|
|
|
+These token-weight pairs are then used in a query against a <<sparse-vector,sparse vector>>
|
|
|
|
+or a <<semantic-text, semantic_text>> field with a compatible sparse inference model.
|
|
At query time, query vectors are calculated using the same inference model that was used to create the tokens.
|
|
At query time, query vectors are calculated using the same inference model that was used to create the tokens.
|
|
When querying, these query vectors are ORed together with their respective weights, which means scoring is effectively a <<vector-functions-dot-product,dot product>> calculation between stored dimensions and query dimensions.
|
|
When querying, these query vectors are ORed together with their respective weights, which means scoring is effectively a <<vector-functions-dot-product,dot product>> calculation between stored dimensions and query dimensions.
|
|
|
|
|
|
@@ -65,6 +66,7 @@ GET _search
|
|
It must be the same inference ID that was used to create the tokens from the input text.
|
|
It must be the same inference ID that was used to create the tokens from the input text.
|
|
Only one of `inference_id` and `query_vector` is allowed.
|
|
Only one of `inference_id` and `query_vector` is allowed.
|
|
If `inference_id` is specified, `query` must also be specified.
|
|
If `inference_id` is specified, `query` must also be specified.
|
|
|
|
+If all queried fields are of type <<semantic-text, semantic_text>>, the inference ID associated with the `semantic_text` field will be inferred.
|
|
|
|
|
|
`query`::
|
|
`query`::
|
|
(Optional, string) The query text you want to use for search.
|
|
(Optional, string) The query text you want to use for search.
|
|
@@ -291,5 +293,3 @@ GET my-index/_search
|
|
//TEST[skip: Requires inference]
|
|
//TEST[skip: Requires inference]
|
|
|
|
|
|
NOTE: When performing <<modules-cross-cluster-search, cross-cluster search>>, inference is performed on the local cluster.
|
|
NOTE: When performing <<modules-cross-cluster-search, cross-cluster search>>, inference is performed on the local cluster.
|
|
-
|
|
|
|
-
|
|
|