incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [2/2] git commit: Fixing parsing bug in the blur parser.
Date Mon, 30 Mar 2015 15:22:17 GMT
Fixing parsing bug in the blur parser.


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

Branch: refs/heads/master
Commit: ecabd6af37ead7edc11167b753ea64d186d9813e
Parents: 52e638c
Author: Aaron McCurry <amccurry@gmail.com>
Authored: Mon Mar 30 10:38:35 2015 -0400
Committer: Aaron McCurry <amccurry@gmail.com>
Committed: Mon Mar 30 10:38:35 2015 -0400

----------------------------------------------------------------------
 .../java/org/apache/blur/lucene/search/BlurQueryParser.java   | 1 +
 .../java/org/apache/blur/lucene/search/SuperParserTest.java   | 7 +++++++
 2 files changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/ecabd6af/blur-query/src/main/java/org/apache/blur/lucene/search/BlurQueryParser.java
----------------------------------------------------------------------
diff --git a/blur-query/src/main/java/org/apache/blur/lucene/search/BlurQueryParser.java b/blur-query/src/main/java/org/apache/blur/lucene/search/BlurQueryParser.java
index c68ae2a..58c8836 100644
--- a/blur-query/src/main/java/org/apache/blur/lucene/search/BlurQueryParser.java
+++ b/blur-query/src/main/java/org/apache/blur/lucene/search/BlurQueryParser.java
@@ -44,6 +44,7 @@ public class BlurQueryParser extends QueryParser {
     _fieldNames = fieldNames == null ? new HashMap<Query, String>() : fieldNames;
     _fieldManager = fieldManager;
     setAllowLeadingWildcard(true);
+    setAutoGeneratePhraseQueries(true);
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/ecabd6af/blur-query/src/test/java/org/apache/blur/lucene/search/SuperParserTest.java
----------------------------------------------------------------------
diff --git a/blur-query/src/test/java/org/apache/blur/lucene/search/SuperParserTest.java b/blur-query/src/test/java/org/apache/blur/lucene/search/SuperParserTest.java
index 73a889b..8d5c190 100644
--- a/blur-query/src/test/java/org/apache/blur/lucene/search/SuperParserTest.java
+++ b/blur-query/src/test/java/org/apache/blur/lucene/search/SuperParserTest.java
@@ -506,6 +506,13 @@ public class SuperParserTest {
     assertQuery(q1, q);
   }
 
+  @Test
+  public void test43() throws ParseException {
+    Query q1 = parseSq("+(+f.c:(s\\-a\\-b))");
+    Query q2 = parseSq("+<+f.c:(s\\-a\\-b)>");
+    assertQuery(q1, q2);
+  }
+
   public static BooleanClause bc_m(Query q) {
     return new BooleanClause(q, Occur.MUST);
   }


Mime
View raw message