Skip to content

Add sparse_vector field type #2304

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

Merged
merged 2 commits into from
Oct 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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