Skip to content

Commit e34cdb6

Browse files
authored
Add sparse_vector field type (#2304)
1 parent eee728f commit e34cdb6

File tree

5 files changed

+20
-12
lines changed

5 files changed

+20
-12
lines changed

output/schema/schema.json

Lines changed: 13 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/typescript/types.ts

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

specification/_types/mapping/Property.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ export enum FieldType {
197197
constant_keyword,
198198
aggregate_metric_double,
199199
dense_vector,
200+
sparse_vector,
200201
match_only_text
201202
}
202203

specification/_types/mapping/core.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,10 @@ export class RankFeaturesProperty extends PropertyBase {
190190
type: 'rank_features'
191191
}
192192

193+
export class SparseVectorProperty extends PropertyBase {
194+
type: 'sparse_vector'
195+
}
196+
193197
export class SearchAsYouTypeProperty extends CorePropertyBase {
194198
analyzer?: string
195199
index?: boolean

specification/_types/query_dsl/abstractions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ export class QueryContainer {
367367
*/
368368
terms_set?: SingleKeyDictionary<Field, TermsSetQuery>
369369
/**
370-
* Uses a natural language processing model to convert the query text into a list of token-weight pairs which are then used in a query against a rank features field.
370+
* Uses a natural language processing model to convert the query text into a list of token-weight pairs which are then used in a query against a sparse vector or rank features field.
371371
* @availability stack since=8.8.0
372372
* @availability serverless
373373
* @doc_id query-dsl-text-expansion-query

0 commit comments

Comments
 (0)