Lucene: missing safeguard to prevent user from accidentally choosing an odd CagraGraphDegree
@imotov is already working on this.
Since Aug 17, 2026.
- Dominant language
- Cuda
- Stars
- 854
- Forks
- 236
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 62
Description
When I pick an odd number as my CagraGraphDegree, we spend the normal amount of time to index, but then we skip querying altogether and provide NaN values for recall. I think Cagra technically requires CagraGraphDegree to be even, but there is no enforcement of this and it took me a while to figure out that setting CagraGraphDegree to be even was one way around this issue -- since others may face this issue in the future, I'm creating this issue to address potentially adding in some sort of enforcement or message to the user (or alternatively would it make sense to just automatically round up to the nearest even number?)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.