apache / apache/lucene

Remove VectorValues#size() [LUCENE-10176]

Open
#11,213 3 comments 0 reactions 0 assignees View on GitHub
legacy-jira-priority:Major type:bug
Dominant language
Java
Stars
3.6k
Forks
1.4k
Avg merge
2d 11h
Merged PRs (30d)
88

Description

This method doesn't seem to be used anywhere except by SimpleTextKnnVectorsReader#search, which uses it in an incorrect way by using it as the total number of hits matching a nearest-neighbor search (it is incorrect because this number might be higher than the number of vectors having a value because of deletes).

---
Migrated from [LUCENE-10176](https://issues.apache.org/jira/browse/LUCENE-10176) by Adrien Grand (@jpountz), updated Feb 16 2022

Contributor guide

Open the contributing guide

Research direction

Start by tracing VectorValues#size() and its use in SimpleTextKnnVectorsReader#search. Check how deletes affect the number of vectors with values, then remove the method and correct the nearest-neighbor search usage; done means the obsolete API is gone and the delete case no longer treats it as the total hit count.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
search
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.