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

Refactor KNNVectorScriptDocValues for Compatibility with Lucene 10 #2433

Open
Vikasht34 opened this issue Jan 24, 2025 · 2 comments
Open

Refactor KNNVectorScriptDocValues for Compatibility with Lucene 10 #2433

Vikasht34 opened this issue Jan 24, 2025 · 2 comments
Assignees

Comments

@Vikasht34
Copy link
Contributor

Description

With the upgrade to Lucene 10, the KNNVectorScriptDocValues implementation in the OpenSearch k-NN plugin faces compatibility issues due to changes in the Lucene API. Specifically:

Issue:
The create method in KNNVectorScriptDocValues attempts to cast a DocIdSetIterator to FloatVectorValues or ByteVectorValues. In Lucene 10, this casting is invalid because these types are no longer compatible.

Error Example: Inconvertible types; cannot cast 'org.apache.lucene.search.DocIdSetIterator' to 'org.apache.lucene.index.FloatVectorValues'

Root Cause: DocIdSetIterator is no longer part of the hierarchy for FloatVectorValues or ByteVectorValues in Lucene 10.
The Lucene 10 API now uses specialized types for vector handling that need to be explicitly managed.

@Vikasht34
Copy link
Contributor Author

Assign this to me

@kotwanikunal
Copy link
Member

Assign this to me

Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants