You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2022/08/21 20:38:19 UTC

[GitHub] [lucene] jtibshirani commented on a diff in pull request #1074: Fix for bad cast when sorting a KnnVectors index over BytesRef

jtibshirani commented on code in PR #1074:
URL: https://github.com/apache/lucene/pull/1074#discussion_r950897203


##########
lucene/codecs/src/java/org/apache/lucene/codecs/simpletext/SimpleTextKnnVectorsWriter.java:
##########
@@ -76,6 +77,10 @@ public class SimpleTextKnnVectorsWriter extends BufferingKnnVectorsWriter {
   public void writeField(FieldInfo fieldInfo, KnnVectorsReader knnVectorsReader, int maxDoc)
       throws IOException {
     VectorValues vectors = knnVectorsReader.getVectorValues(fieldInfo.name);
+    if (fieldInfo.getVectorEncoding() != VectorEncoding.FLOAT32) {

Review Comment:
   Since `VectorEncoding` belongs to `FieldInfo`, it's expected that any codec implementations will support it. (It's just not supported by the old HNSW codecs, which makes sense). So it seems like we should update `SimpleTextKnnVectorsWriter` to support byte encodings. Maybe we could at least file an issue about it to track it?



-- 
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-unsubscribe@lucene.apache.org

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


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