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

Enforce VectorValues.cost() is equal to size(). #11962

Merged
merged 3 commits into from
Nov 23, 2022

Conversation

jpountz
Copy link
Contributor

@jpountz jpountz commented Nov 22, 2022

VectorValues have a cost() method that reports an approximate number of documents that have a vector, but also a size() method that reports the accurate number of vectors in the field. Since KNN vectors only support single-valued fields we should enforce that cost() returns the size().

`VectorValues` have a `cost()` method that reports an approximate number of
documents that have a vector, but also a `size()` method that reports the
accurate number of vectors in the field. Since KNN vectors only support
single-valued fields we should enforce that `cost()` returns the `size()`.
Copy link
Contributor

@gsmiller gsmiller left a comment

Choose a reason for hiding this comment

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

Seems reasonable to me

@jpountz jpountz merged commit 8027746 into apache:main Nov 23, 2022
@jpountz jpountz deleted the vectorvalues_cost branch November 23, 2022 10:05
jpountz added a commit that referenced this pull request Nov 23, 2022
`VectorValues` have a `cost()` method that reports an approximate number of
documents that have a vector, but also a `size()` method that reports the
accurate number of vectors in the field. Since KNN vectors only support
single-valued fields we should enforce that `cost()` returns the `size()`.
@jpountz jpountz added this to the 9.5.0 milestone Nov 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants