From f1e234dd8c0324c1ff6551c7bc0cf3d0edf94914 Mon Sep 17 00:00:00 2001 From: "Brian S. O'Neill" Date: Fri, 3 Aug 2007 03:28:17 +0000 Subject: Make sure partial comparator does not use full comparator rules. --- src/main/java/com/amazon/carbonado/qe/CompositeScore.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/main') 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 { } } - 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 { } else if (secondScore.hasAnyMatches()) { return 1; } + return 0; } + // Additional tests for full comparator. + + result = FilteringScore.fullComparator().compare(firstScore, secondScore); + if (result != 0) { return result; } -- cgit v1.2.3