Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add specification for new sparse vector query; deprecate specification for text_expansion and weighted_tokens queries #2642

Merged
merged 14 commits into from
Jun 26, 2024
Merged
89 changes: 72 additions & 17 deletions output/openapi/elasticsearch-openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -57225,6 +57225,9 @@
"span_within": {
"$ref": "#/components/schemas/_types.query_dsl:SpanWithinQuery"
},
"sparse_vector": {
"$ref": "#/components/schemas/_types.query_dsl:SparseVectorQuery"
},
"term": {
"externalDocs": {
"url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-term-query.html"
Expand Down Expand Up @@ -57253,6 +57256,7 @@
"maxProperties": 1
},
"text_expansion": {
"deprecated": true,
"externalDocs": {
"url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-text-expansion-query.html"
},
Expand All @@ -57265,6 +57269,7 @@
"maxProperties": 1
},
"weighted_tokens": {
"deprecated": true,
"description": "Supports returning text_expansion query results by sending in precomputed tokens with the query.",
"type": "object",
"additionalProperties": {
Expand Down Expand Up @@ -61163,6 +61168,73 @@
}
]
},
"_types.query_dsl:SparseVectorQuery": {
"allOf": [
{
"$ref": "#/components/schemas/_types.query_dsl:QueryBase"
},
{
"allOf": [
{
"type": "object",
"properties": {
"field": {
"$ref": "#/components/schemas/_types:Field"
}
},
"required": [
"field"
]
},
{
"type": "object",
"properties": {
"query_vector": {
"description": "Dictionary of precomputed sparse vectors and their associated weights.\nOnly one of inference_id or query_vector may be supplied in a request.",
"type": "object",
"additionalProperties": {
"type": "number"
}
},
"inference_id": {
"$ref": "#/components/schemas/_types:Id"
},
"query": {
"description": "The query text you want to use for search.\nIf inference_id is specified, query must also be specified.",
"type": "string"
},
"prune": {
"description": "Whether to perform pruning, omitting the non-significant tokens from the query to improve query performance.\nIf prune is true but the pruning_config is not specified, pruning will occur but default values will be used.\nDefault: false",
"type": "boolean"
},
"pruning_config": {
"$ref": "#/components/schemas/_types.query_dsl:TokenPruningConfig"
}
},
"minProperties": 1,
"maxProperties": 1
}
]
}
]
},
"_types.query_dsl:TokenPruningConfig": {
"type": "object",
"properties": {
"tokens_freq_ratio_threshold": {
"description": "Tokens whose frequency is more than this threshold times the average frequency of all tokens in the specified field are considered outliers and pruned.",
"type": "number"
},
"tokens_weight_threshold": {
"description": "Tokens whose weight is less than this threshold are considered nonsignificant and pruned.",
"type": "number"
},
"only_score_pruned_tokens": {
"description": "Whether to only score pruned tokens, vs only scoring kept tokens.",
"type": "boolean"
}
}
},
"_types.query_dsl:TermQuery": {
"allOf": [
{
Expand Down Expand Up @@ -61250,23 +61322,6 @@
}
]
},
"_types.query_dsl:TokenPruningConfig": {
"type": "object",
"properties": {
"tokens_freq_ratio_threshold": {
"description": "Tokens whose frequency is more than this threshold times the average frequency of all tokens in the specified field are considered outliers and pruned.",
"type": "number"
},
"tokens_weight_threshold": {
"description": "Tokens whose weight is less than this threshold are considered nonsignificant and pruned.",
"type": "number"
},
"only_score_pruned_tokens": {
"description": "Whether to only score pruned tokens, vs only scoring kept tokens.",
"type": "boolean"
}
}
},
"_types.query_dsl:WeightedTokensQuery": {
"allOf": [
{
Expand Down
89 changes: 72 additions & 17 deletions output/openapi/elasticsearch-serverless-openapi.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading