Skip to content

Conversation

@kderusso
Copy link
Member

Adds specification for the new sparse_vector query and deprecates the specifications for text_expansion and weighted_tokens queries.

@kderusso kderusso requested a review from a team June 24, 2024 12:59
@l-trotta
Copy link
Contributor

if I got this right every sparse query should have either query_vector or inference_id, the way we model this to have it checked client side is to add /** @variants container */ on top of the class and mark all properties that can always be added with @variant container_property, an example of this is PinnedQuery where you must set either ids or docs

@l-trotta l-trotta self-assigned this Jun 25, 2024
@kderusso
Copy link
Member Author

if I got this right every sparse query should have either query_vector or inference_id, the way we model this to have it checked client side is to add /** @Variants container */ on top of the class and mark all properties that can always be added with @variant container_property, an example of this is PinnedQuery where you must set either ids or docs

Thanks @l-trotta! I think I got this right?

flobernd and others added 7 commits June 25, 2024 09:18
* wrap ts-morph errors to provide helpful error

* improve after lint
Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3.
- [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md)
- [Commits](micromatch/braces@3.0.2...3.0.3)

---
updated-dependencies:
- dependency-name: braces
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Mark existing query rules APIs as GA

* Add individual CRUD API calls

* Linting

* PR feedback

* PR feedback
@l-trotta
Copy link
Contributor

almost! all properties that aren't query_vector or inference_id should be @variant container_property, so not just field. basically this is to assure that either query_vector or inference_id are set, but not both of them, while all the other properties are unaffected by this check.

Copy link
Contributor

@l-trotta l-trotta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@kderusso kderusso merged commit f737f34 into main Jun 26, 2024
@kderusso kderusso deleted the kderusso/add-sparse-vector-query branch June 26, 2024 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants