incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [3/3] git commit: Fixing a small scoring issue in SuperQuery.
Date Tue, 03 Dec 2013 19:15:10 GMT
Fixing a small scoring issue in SuperQuery.


Project: http://git-wip-us.apache.org/repos/asf/incubator-blur/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-blur/commit/867043eb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-blur/tree/867043eb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-blur/diff/867043eb

Branch: refs/heads/master
Commit: 867043eb88e7b27c0bb0ea1e59b718268abf1f02
Parents: b322eaf
Author: Aaron McCurry <amccurry@gmail.com>
Authored: Tue Dec 3 13:23:29 2013 -0500
Committer: Aaron McCurry <amccurry@gmail.com>
Committed: Tue Dec 3 14:14:54 2013 -0500

----------------------------------------------------------------------
 .../src/main/java/org/apache/blur/lucene/search/SuperQuery.java   | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/867043eb/blur-query/src/main/java/org/apache/blur/lucene/search/SuperQuery.java
----------------------------------------------------------------------
diff --git a/blur-query/src/main/java/org/apache/blur/lucene/search/SuperQuery.java b/blur-query/src/main/java/org/apache/blur/lucene/search/SuperQuery.java
index 5a436c1..5fbe70e 100644
--- a/blur-query/src/main/java/org/apache/blur/lucene/search/SuperQuery.java
+++ b/blur-query/src/main/java/org/apache/blur/lucene/search/SuperQuery.java
@@ -204,6 +204,9 @@ public class SuperQuery extends AbstractWrapperQuery {
       case CONSTANT:
         return 1;
       case SUPER:
+        if (aggregateScore < 1.0) {
+          return aggregateScore;
+        }
         double log = Math.log10(aggregateScore) + 1.0;
         double avg = aggregateScore / hitsInEntity;
         double pow = Math.pow(avg, SUPER_POWER_CONSTANT);


Mime
View raw message