Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

LUCENE-4423: DocumentStoredFieldVisitor.binaryField ignores offset and length.

Adrien Grand7145779e4dc3
diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt
index 4b8fd90fdac..f8d287d312b 100644
--- a/lucene/CHANGES.txt
+++ b/lucene/CHANGES.txt
@@ -141,6 +141,9 @@ API Changes
Bug Fixes
+* LUCENE-4423: DocumentStoredFieldVisitor.binaryField ignored offset and
+ length. (Adrien Grand)
+
* LUCENE-4297: BooleanScorer2 would multiply the coord() factor
twice for conjunctions: for most users this is no problem, but
if you had a customized Similarity that returned something other
diff --git a/lucene/core/src/java/org/apache/lucene/document/DocumentStoredFieldVisitor.java b/lucene/core/src/java/org/apache/lucene/document/DocumentStoredFieldVisitor.java
index 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 {
@Override
public 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