Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

Change Similarity to use SmallFloat for norm encoding

Yonik Seeley208760307f0c
diff --git a/CHANGES.txt b/CHANGES.txt
index 628645a0023..20c3ca70cf1 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -356,6 +356,11 @@ Optimizations
and sorting the first time on a field.
(Yonik Seeley, LUCENE-454)
+11. Optimized and generalized 32 bit floating point to byte
+ (custom 8 bit floating point) conversions. Increased the speed of
+ Similarity.encodeNorm() anywhere from 10% to 250%, depending on the JVM.
+ (Yonik Seeley, LUCENE-467)
+
Infrastructure
1. Lucene's source code repository has converted from CVS to
diff --git a/src/java/org/apache/lucene/util/SmallFloat.java b/src/java/org/apache/lucene/util/SmallFloat.java
index 462cae99761..3e71e6e3d95 100644
--- a/src/java/org/apache/lucene/util/SmallFloat.java
+++ b/src/java/org/apache/lucene/util/SmallFloat.java
@@ -21,7 +21,7 @@ package org.apache.lucene.util;
* @author yonik
* @version $Id$
*/
-class SmallFloat {
+public class SmallFloat {
/** Converts a 32 bit float to an 8 bit float.
* <br>Values less than zero are all mapped to zero.