incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [1/3] git commit: Fixing a small scoring issue in SuperQuery.
Date Tue, 03 Dec 2013 19:12:04 GMT
Updated Branches:
  refs/heads/apache-blur-0.2 a348d49c2 -> 6d1ef8bb1


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/de596916
Tree: http://git-wip-us.apache.org/repos/asf/incubator-blur/tree/de596916
Diff: http://git-wip-us.apache.org/repos/asf/incubator-blur/diff/de596916

Branch: refs/heads/apache-blur-0.2
Commit: de596916af31c8f563cf1d16f6fbc4969684f189
Parents: a348d49
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 13:23:29 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/de596916/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