diff --git a/src/main/java/org/elasticsearch/index/query/image/AbstractImageScorer.java b/src/main/java/org/elasticsearch/index/query/image/AbstractImageScorer.java index ecd380f..426402c 100644 --- a/src/main/java/org/elasticsearch/index/query/image/AbstractImageScorer.java +++ b/src/main/java/org/elasticsearch/index/query/image/AbstractImageScorer.java @@ -44,7 +44,7 @@ public float score() throws IOException { try { BytesRef bytesRef = binaryDocValues.get(docID()); LireFeature docFeature = lireFeature.getClass().newInstance(); - docFeature.setByteArrayRepresentation(bytesRef.bytes); + docFeature.setByteArrayRepresentation(bytesRef.bytes, bytesRef.offset, bytesRef.length); double distance = lireFeature.getDistance(docFeature); double score;