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
This commit is contained in:
Grant Ingersoll 2009-08-07 23:57:25 +00:00
parent e079d1cec3
commit 1fbf723c3c
1 changed files with 4 additions and 3 deletions

View File

@ -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);
}
}