Skip to content

Apache Lucene open-source search software

LUCENE-1182: Added delegation to scorePayload

Grant Ingersolld5271e5619ba
diff --git a/CHANGES.txt b/CHANGES.txt
index 158fbe41dd3..4ef066f52b9 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -77,6 +77,8 @@ Bug fixes
5. LUCENE-1179: Fixed assert statement that was incorrectly
preventing Fields with empty-string field name from working.
(Sergey Kabashnyuk via Mike McCandless)
+
+ 6. LUCENE-1182: Added scorePayload to SimilarityDelegator (Andi Vajda via Grant Ingersoll)
New features
diff --git a/src/java/org/apache/lucene/search/SimilarityDelegator.java b/src/java/org/apache/lucene/search/SimilarityDelegator.java
index ff58c027728..4fc26efb39e 100644
--- a/src/java/org/apache/lucene/search/SimilarityDelegator.java
+++ b/src/java/org/apache/lucene/search/SimilarityDelegator.java
@@ -56,4 +56,7 @@ public class SimilarityDelegator extends Similarity {
return delegee.coord(overlap, maxOverlap);
}
+ public float scorePayload(String fieldName, byte[] payload, int offset, int length) {
+ return delegee.scorePayload(fieldName, payload, offset, length);
+ }
}