Skip to content

Commit

Permalink
Add sparse_vector field type (#2304)
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosdelest authored Oct 6, 2023
1 parent eee728f commit e34cdb6
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 12 deletions.
23 changes: 13 additions & 10 deletions output/schema/schema.json

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

2 changes: 1 addition & 1 deletion output/typescript/types.ts

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

1 change: 1 addition & 0 deletions specification/_types/mapping/Property.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ export enum FieldType {
constant_keyword,
aggregate_metric_double,
dense_vector,
sparse_vector,
match_only_text
}

Expand Down
4 changes: 4 additions & 0 deletions specification/_types/mapping/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,10 @@ export class RankFeaturesProperty extends PropertyBase {
type: 'rank_features'
}

export class SparseVectorProperty extends PropertyBase {
type: 'sparse_vector'
}

export class SearchAsYouTypeProperty extends CorePropertyBase {
analyzer?: string
index?: boolean
Expand Down
2 changes: 1 addition & 1 deletion specification/_types/query_dsl/abstractions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ export class QueryContainer {
*/
terms_set?: SingleKeyDictionary<Field, TermsSetQuery>
/**
* 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.
* 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.
* @availability stack since=8.8.0
* @availability serverless
* @doc_id query-dsl-text-expansion-query
Expand Down

0 comments on commit e34cdb6

Please sign in to comment.