Created
July 28, 2011 11:41
-
-
Save SQiShER/1111424 to your computer and use it in GitHub Desktop.
This is the reason why Lucene scoring was a little bit off for searches with very short terms (if I recall correctly)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private final Similarity similarity = new DefaultSimilarity() | |
{ | |
private static final long serialVersionUID = 1L; | |
@Override | |
public byte encodeNormValue(final float f) | |
{ | |
return SmallFloat.floatToByte52(f); | |
} | |
@Override | |
public float decodeNormValue(final byte b) | |
{ | |
return SmallFloat.byte52ToFloat(b); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment