From 1fbf723c3c874221b718dd2b71cc70759d814fdc Mon Sep 17 00:00:00 2001 From: Grant Ingersoll Date: Fri, 7 Aug 2009 23:57:25 +0000 Subject: [PATCH] LUCENE-1790: flip around for back compatibility git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@802272 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/lucene/search/Similarity.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/java/org/apache/lucene/search/Similarity.java b/src/java/org/apache/lucene/search/Similarity.java index f7124d4cfe4..c11adfb9244 100644 --- a/src/java/org/apache/lucene/search/Similarity.java +++ b/src/java/org/apache/lucene/search/Similarity.java @@ -548,10 +548,11 @@ public abstract class Similarity implements Serializable { * * @deprecated See {@link #scorePayload(int, String, byte[], int, int)} */ + //TODO: When removing this, set the default value below to return 1. public float scorePayload(String fieldName, byte [] payload, int offset, int length) { //Do nothing - return scorePayload(NO_DOC_ID_PROVIDED, fieldName, payload, offset, length); + return 1; } /** @@ -571,8 +572,8 @@ public abstract class Similarity implements Serializable { */ public float scorePayload(int docId, String fieldName, byte [] payload, int offset, int length) { - //Do nothing - return 1; + //TODO: When removing the deprecated scorePayload above, set this to return 1 + return scorePayload(fieldName, payload, offset, length); } }