lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gsing...@apache.org
Subject svn commit: r802272 - /lucene/java/trunk/src/java/org/apache/lucene/search/Similarity.java
Date Fri, 07 Aug 2009 23:57:25 GMT
Author: gsingers
Date: Fri Aug  7 23:57:25 2009
New Revision: 802272

URL: http://svn.apache.org/viewvc?rev=802272&view=rev
Log:
LUCENE-1790: flip around for back compatibility

Modified:
    lucene/java/trunk/src/java/org/apache/lucene/search/Similarity.java

Modified: lucene/java/trunk/src/java/org/apache/lucene/search/Similarity.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/search/Similarity.java?rev=802272&r1=802271&r2=802272&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/search/Similarity.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/search/Similarity.java Fri Aug  7 23:57:25
2009
@@ -548,10 +548,11 @@
    *
    * @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 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);
   }
 
 }



Mime
View raw message