incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject git commit: Fixed BLUR-138
Date Mon, 17 Jun 2013 18:19:45 GMT
Updated Branches:
  refs/heads/master 50f1eaafd -> acadf0611


Fixed BLUR-138


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

Branch: refs/heads/master
Commit: acadf0611e56c871b746a6c32b31034e1bc07228
Parents: 50f1eaa
Author: Aaron McCurry <amccurry@gmail.com>
Authored: Mon Jun 17 14:19:34 2013 -0400
Committer: Aaron McCurry <amccurry@gmail.com>
Committed: Mon Jun 17 14:19:34 2013 -0400

----------------------------------------------------------------------
 .../java/org/apache/blur/manager/IndexManager.java   | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/acadf061/blur-core/src/main/java/org/apache/blur/manager/IndexManager.java
----------------------------------------------------------------------
diff --git a/blur-core/src/main/java/org/apache/blur/manager/IndexManager.java b/blur-core/src/main/java/org/apache/blur/manager/IndexManager.java
index 9be2b92..618b4a2 100644
--- a/blur-core/src/main/java/org/apache/blur/manager/IndexManager.java
+++ b/blur-core/src/main/java/org/apache/blur/manager/IndexManager.java
@@ -375,7 +375,8 @@ public class IndexManager {
             _filterCache, context);
         Query userQuery = QueryParserUtil.parseQuery(simpleQuery.queryStr, simpleQuery.superQueryOn,
analyzer,
             postFilter, preFilter, getScoreType(simpleQuery.type), context);
-        Query facetedQuery = getFacetedQuery(blurQuery, userQuery, facetedCounts, analyzer,
context);
+        Query facetedQuery = getFacetedQuery(blurQuery, userQuery, facetedCounts, analyzer,
context, postFilter,
+            preFilter);
         call = new SimpleQueryParallelCall(running, table, status, _indexServer, facetedQuery,
blurQuery.selector,
             _queriesInternalMeter, shardServerContext);
       } else {
@@ -387,7 +388,7 @@ public class IndexManager {
         } else {
           userQuery = query;
         }
-        Query facetedQuery = getFacetedQuery(blurQuery, userQuery, facetedCounts, analyzer,
context);
+        Query facetedQuery = getFacetedQuery(blurQuery, userQuery, facetedCounts, analyzer,
context, null, null);
         call = new SimpleQueryParallelCall(running, table, status, _indexServer, facetedQuery,
blurQuery.selector,
             _queriesInternalMeter, shardServerContext);
       }
@@ -423,20 +424,20 @@ public class IndexManager {
   }
 
   private Query getFacetedQuery(BlurQuery blurQuery, Query userQuery, AtomicLongArray counts,
BlurAnalyzer analyzer,
-      TableContext context) throws ParseException {
+      TableContext context, Filter postFilter, Filter preFilter) throws ParseException {
     if (blurQuery.facets == null) {
       return userQuery;
     }
-    return new FacetQuery(userQuery, getFacetQueries(blurQuery, analyzer, context), counts);
+    return new FacetQuery(userQuery, getFacetQueries(blurQuery, analyzer, context, postFilter,
preFilter), counts);
   }
 
-  private Query[] getFacetQueries(BlurQuery blurQuery, BlurAnalyzer analyzer, TableContext
context)
-      throws ParseException {
+  private Query[] getFacetQueries(BlurQuery blurQuery, BlurAnalyzer analyzer, TableContext
context, Filter postFilter,
+      Filter preFilter) throws ParseException {
     int size = blurQuery.facets.size();
     Query[] queries = new Query[size];
     for (int i = 0; i < size; i++) {
       queries[i] = QueryParserUtil.parseQuery(blurQuery.facets.get(i).queryStr, blurQuery.simpleQuery.superQueryOn,
-          analyzer, null, null, ScoreType.CONSTANT, context);
+          analyzer, postFilter, preFilter, ScoreType.CONSTANT, context);
     }
     return queries;
   }


Mime
View raw message