summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrian S. O'Neill <bronee@gmail.com>2007-08-03 03:28:17 +0000
committerBrian S. O'Neill <bronee@gmail.com>2007-08-03 03:28:17 +0000
commitf1e234dd8c0324c1ff6551c7bc0cf3d0edf94914 (patch)
treed76ff8783002256f5a2b789cd072aebd32d58291 /src
parent078be4acf8c34a96783c06f093ce11ff7551eeda (diff)
Make sure partial comparator does not use full comparator rules.
Diffstat (limited to 'src')
-rw-r--r--src/main/java/com/amazon/carbonado/qe/CompositeScore.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/main/java/com/amazon/carbonado/qe/CompositeScore.java b/src/main/java/com/amazon/carbonado/qe/CompositeScore.java
index 2e266c1..0006cce 100644
--- a/src/main/java/com/amazon/carbonado/qe/CompositeScore.java
+++ b/src/main/java/com/amazon/carbonado/qe/CompositeScore.java
@@ -280,9 +280,7 @@ public class CompositeScore<S extends Storable> {
}
}
- if (mFull) {
- result = FilteringScore.fullComparator().compare(firstScore, secondScore);
- } else {
+ if (!mFull) {
// Favor index that has any matches.
if (firstScore.hasAnyMatches()) {
if (!secondScore.hasAnyMatches()) {
@@ -291,8 +289,13 @@ public class CompositeScore<S extends Storable> {
} else if (secondScore.hasAnyMatches()) {
return 1;
}
+ return 0;
}
+ // Additional tests for full comparator.
+
+ result = FilteringScore.fullComparator().compare(firstScore, secondScore);
+
if (result != 0) {
return result;
}