Apache Lucene open-source search software
LUCENE-4423: DocumentStoredFieldVisitor.binaryField ignores offset and length.
Adrien Grand7145779e4dc3
diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txtindex 4b8fd90fdac..f8d287d312b 100644--- a/lucene/CHANGES.txt+++ b/lucene/CHANGES.txt@@ -141,6 +141,9 @@ API ChangesBug Fixes+* LUCENE-4423: DocumentStoredFieldVisitor.binaryField ignored offset and+ length. (Adrien Grand)+* LUCENE-4297: BooleanScorer2 would multiply the coord() factortwice for conjunctions: for most users this is no problem, butif you had a customized Similarity that returned something otherdiff --git a/lucene/core/src/java/org/apache/lucene/document/DocumentStoredFieldVisitor.java b/lucene/core/src/java/org/apache/lucene/document/DocumentStoredFieldVisitor.javaindex 5f566c58be6..a8927363dc3 100644--- a/lucene/core/src/java/org/apache/lucene/document/DocumentStoredFieldVisitor.java+++ b/lucene/core/src/java/org/apache/lucene/document/DocumentStoredFieldVisitor.java@@ -59,7 +59,7 @@ public class DocumentStoredFieldVisitor extends StoredFieldVisitor {@Overridepublic void binaryField(FieldInfo fieldInfo, byte[] value, int offset, int length) throws IOException {- doc.add(new StoredField(fieldInfo.name, value));+ doc.add(new StoredField(fieldInfo.name, value, offset, length));}@Override