shubhamvishu opened a new issue, #12635:
URL: https://github.com/apache/lucene/issues/12635

   ### Description
   
   Currently, there is lot of code duplication due to 
[ByteVectorValues](https://github.com/apache/lucene/blob/main/lucene/core/src/java/org/apache/lucene/index/ByteVectorValues.java)
 and 
[FloatVectorValues](https://github.com/apache/lucene/blob/main/lucene/core/src/java/org/apache/lucene/index/FloatVectorValues.java)
 (Example - 
[one](https://github.com/apache/lucene/blob/main/lucene/core/src/java/org/apache/lucene/codecs/KnnVectorsWriter.java#L48-L73),
 
[two](https://github.com/apache/lucene/blob/main/lucene/core/src/java/org/apache/lucene/codecs/KnnVectorsWriter.java#L109-L301)
 etc.) because they are handled separately as one returns byte[] and other 
float[] for `vectorValue` method. The idea is if we should have a common 
interface `VectorValues`? that provides the common functionality and we could 
eventually get rid of this duplication. As a first step maybe we could try to 
move the below methods(common in above 2 classes) into its different interface 
`VectorValues`?
   
   - int dimension()
   - int size()
   - byte[]/float[] vectorValue()


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to