You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by sa...@apache.org on 2016/06/15 21:33:06 UTC

[1/2] lucene-solr:branch_5_5: LUCENE-7219: Make queryparser/xml NumericRange(Query|Filter) builders match the underlying (query|filter)'s (lower|upper)Term optionality logic. (Kaneshanathan Srivisagan, Christine Poerschke)

Repository: lucene-solr
Updated Branches:
  refs/heads/branch_5_5 2a3492574 -> f4362098f


LUCENE-7219: Make queryparser/xml NumericRange(Query|Filter) builders match the underlying (query|filter)'s (lower|upper)Term optionality logic. (Kaneshanathan Srivisagan, Christine Poerschke)


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/8eeb5858
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/8eeb5858
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/8eeb5858

Branch: refs/heads/branch_5_5
Commit: 8eeb5858d407347099dfe360d01682669a27b02f
Parents: 2a34925
Author: Christine Poerschke <cp...@apache.org>
Authored: Mon Apr 18 09:58:38 2016 +0100
Committer: Steve Rowe <sa...@apache.org>
Committed: Wed Jun 15 17:27:59 2016 -0400

----------------------------------------------------------------------
 .../xml/builders/NumericRangeFilterBuilder.java | 36 +++++++++++--------
 .../xml/builders/NumericRangeQueryBuilder.java  | 36 +++++++++++--------
 .../NumericRangeFilterQueryWithoutLowerTerm.xml | 37 ++++++++++++++++++++
 .../xml/NumericRangeFilterQueryWithoutRange.xml | 37 ++++++++++++++++++++
 .../NumericRangeFilterQueryWithoutUpperTerm.xml | 37 ++++++++++++++++++++
 .../xml/NumericRangeQueryWithoutLowerTerm.xml   | 31 ++++++++++++++++
 .../xml/NumericRangeQueryWithoutRange.xml       | 31 ++++++++++++++++
 .../xml/NumericRangeQueryWithoutUpperTerm.xml   | 31 ++++++++++++++++
 .../lucene/queryparser/xml/TestCoreParser.java  | 30 ++++++++++++++++
 9 files changed, 278 insertions(+), 28 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8eeb5858/lucene/queryparser/src/java/org/apache/lucene/queryparser/xml/builders/NumericRangeFilterBuilder.java
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/xml/builders/NumericRangeFilterBuilder.java b/lucene/queryparser/src/java/org/apache/lucene/queryparser/xml/builders/NumericRangeFilterBuilder.java
index a4732d5..533f725 100644
--- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/xml/builders/NumericRangeFilterBuilder.java
+++ b/lucene/queryparser/src/java/org/apache/lucene/queryparser/xml/builders/NumericRangeFilterBuilder.java
@@ -50,14 +50,14 @@ import java.io.IOException;
  * <tr>
  * <td>lowerTerm</td>
  * <td>Specified by <tt>type</tt></td>
- * <td>Yes</td>
- * <td>N/A</td>
+ * <td>No</td>
+ * <td>Null</td>
  * </tr>
  * <tr>
  * <td>upperTerm</td>
  * <td>Specified by <tt>type</tt></td>
- * <td>Yes</td>
- * <td>N/A</td>
+ * <td>No</td>
+ * <td>Null</td>
  * </tr>
  * <tr>
  * <td>type</td>
@@ -114,8 +114,8 @@ public class NumericRangeFilterBuilder implements FilterBuilder {
   @Override
   public Filter getFilter(Element e) throws ParserException {
     String field = DOMUtils.getAttributeWithInheritanceOrFail(e, "fieldName");
-    String lowerTerm = DOMUtils.getAttributeOrFail(e, "lowerTerm");
-    String upperTerm = DOMUtils.getAttributeOrFail(e, "upperTerm");
+    final String lowerTerm = DOMUtils.getAttribute(e, "lowerTerm", null);
+    final String upperTerm = DOMUtils.getAttribute(e, "upperTerm", null);
     boolean lowerInclusive = DOMUtils.getAttribute(e, "includeLower", true);
     boolean upperInclusive = DOMUtils.getAttribute(e, "includeUpper", true);
     int precisionStep = DOMUtils.getAttribute(e, "precisionStep", NumericUtils.PRECISION_STEP_DEFAULT);
@@ -124,20 +124,28 @@ public class NumericRangeFilterBuilder implements FilterBuilder {
     try {
       Filter filter;
       if (type.equalsIgnoreCase("int")) {
-        filter = NumericRangeFilter.newIntRange(field, precisionStep, Integer
-            .valueOf(lowerTerm), Integer.valueOf(upperTerm), lowerInclusive,
+        filter = NumericRangeFilter.newIntRange(field, precisionStep,
+            (lowerTerm == null ? null : Integer.valueOf(lowerTerm)),
+            (upperTerm == null ? null : Integer.valueOf(upperTerm)),
+            lowerInclusive,
             upperInclusive);
       } else if (type.equalsIgnoreCase("long")) {
-        filter = NumericRangeFilter.newLongRange(field, precisionStep, Long
-            .valueOf(lowerTerm), Long.valueOf(upperTerm), lowerInclusive,
+        filter = NumericRangeFilter.newLongRange(field, precisionStep,
+            (lowerTerm == null ? null : Long.valueOf(lowerTerm)),
+            (upperTerm == null ? null : Long.valueOf(upperTerm)),
+            lowerInclusive,
             upperInclusive);
       } else if (type.equalsIgnoreCase("double")) {
-        filter = NumericRangeFilter.newDoubleRange(field, precisionStep, Double
-            .valueOf(lowerTerm), Double.valueOf(upperTerm), lowerInclusive,
+        filter = NumericRangeFilter.newDoubleRange(field, precisionStep,
+            (lowerTerm == null ? null : Double.valueOf(lowerTerm)),
+            (upperTerm == null ? null : Double.valueOf(upperTerm)),
+            lowerInclusive,
             upperInclusive);
       } else if (type.equalsIgnoreCase("float")) {
-        filter = NumericRangeFilter.newFloatRange(field, precisionStep, Float
-            .valueOf(lowerTerm), Float.valueOf(upperTerm), lowerInclusive,
+        filter = NumericRangeFilter.newFloatRange(field, precisionStep,
+            (lowerTerm == null ? null : Float.valueOf(lowerTerm)),
+            (upperTerm == null ? null : Float.valueOf(upperTerm)),
+            lowerInclusive,
             upperInclusive);
       } else {
         throw new ParserException("type attribute must be one of: [long, int, double, float]");

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8eeb5858/lucene/queryparser/src/java/org/apache/lucene/queryparser/xml/builders/NumericRangeQueryBuilder.java
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/xml/builders/NumericRangeQueryBuilder.java b/lucene/queryparser/src/java/org/apache/lucene/queryparser/xml/builders/NumericRangeQueryBuilder.java
index 4b7900d..bec7dc1 100644
--- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/xml/builders/NumericRangeQueryBuilder.java
+++ b/lucene/queryparser/src/java/org/apache/lucene/queryparser/xml/builders/NumericRangeQueryBuilder.java
@@ -45,14 +45,14 @@ import org.w3c.dom.Element;
  * <tr>
  * <td>lowerTerm</td>
  * <td>Specified by <tt>type</tt></td>
- * <td>Yes</td>
- * <td>N/A</td>
+ * <td>No</td>
+ * <td>Null</td>
  * </tr>
  * <tr>
  * <td>upperTerm</td>
  * <td>Specified by <tt>type</tt></td>
- * <td>Yes</td>
- * <td>N/A</td>
+ * <td>No</td>
+ * <td>Null</td>
  * </tr>
  * <tr>
  * <td>type</td>
@@ -89,8 +89,8 @@ public class NumericRangeQueryBuilder implements QueryBuilder {
   @Override
   public Query getQuery(Element e) throws ParserException {
     String field = DOMUtils.getAttributeWithInheritanceOrFail(e, "fieldName");
-    String lowerTerm = DOMUtils.getAttributeOrFail(e, "lowerTerm");
-    String upperTerm = DOMUtils.getAttributeOrFail(e, "upperTerm");
+    final String lowerTerm = DOMUtils.getAttribute(e, "lowerTerm", null);
+    final String upperTerm = DOMUtils.getAttribute(e, "upperTerm", null);
     boolean lowerInclusive = DOMUtils.getAttribute(e, "includeLower", true);
     boolean upperInclusive = DOMUtils.getAttribute(e, "includeUpper", true);
     int precisionStep = DOMUtils.getAttribute(e, "precisionStep", NumericUtils.PRECISION_STEP_DEFAULT);
@@ -99,20 +99,28 @@ public class NumericRangeQueryBuilder implements QueryBuilder {
     try {
       Query filter;
       if (type.equalsIgnoreCase("int")) {
-        filter = NumericRangeQuery.newIntRange(field, precisionStep, Integer
-            .valueOf(lowerTerm), Integer.valueOf(upperTerm), lowerInclusive,
+        filter = NumericRangeQuery.newIntRange(field, precisionStep,
+            (lowerTerm == null ? null : Integer.valueOf(lowerTerm)),
+            (upperTerm == null ? null : Integer.valueOf(upperTerm)),
+            lowerInclusive,
             upperInclusive);
       } else if (type.equalsIgnoreCase("long")) {
-        filter = NumericRangeQuery.newLongRange(field, precisionStep, Long
-            .valueOf(lowerTerm), Long.valueOf(upperTerm), lowerInclusive,
+        filter = NumericRangeQuery.newLongRange(field, precisionStep,
+            (lowerTerm == null ? null : Long.valueOf(lowerTerm)),
+            (upperTerm == null ? null : Long.valueOf(upperTerm)),
+            lowerInclusive,
             upperInclusive);
       } else if (type.equalsIgnoreCase("double")) {
-        filter = NumericRangeQuery.newDoubleRange(field, precisionStep, Double
-            .valueOf(lowerTerm), Double.valueOf(upperTerm), lowerInclusive,
+        filter = NumericRangeQuery.newDoubleRange(field, precisionStep,
+            (lowerTerm == null ? null : Double.valueOf(lowerTerm)),
+            (upperTerm == null ? null : Double.valueOf(upperTerm)),
+            lowerInclusive,
             upperInclusive);
       } else if (type.equalsIgnoreCase("float")) {
-        filter = NumericRangeQuery.newFloatRange(field, precisionStep, Float
-            .valueOf(lowerTerm), Float.valueOf(upperTerm), lowerInclusive,
+        filter = NumericRangeQuery.newFloatRange(field, precisionStep,
+            (lowerTerm == null ? null : Float.valueOf(lowerTerm)),
+            (upperTerm == null ? null : Float.valueOf(upperTerm)),
+            lowerInclusive,
             upperInclusive);
       } else {
         throw new ParserException("type attribute must be one of: [long, int, double, float]");

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8eeb5858/lucene/queryparser/src/test/org/apache/lucene/queryparser/xml/NumericRangeFilterQueryWithoutLowerTerm.xml
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/org/apache/lucene/queryparser/xml/NumericRangeFilterQueryWithoutLowerTerm.xml b/lucene/queryparser/src/test/org/apache/lucene/queryparser/xml/NumericRangeFilterQueryWithoutLowerTerm.xml
new file mode 100644
index 0000000..24d988e
--- /dev/null
+++ b/lucene/queryparser/src/test/org/apache/lucene/queryparser/xml/NumericRangeFilterQueryWithoutLowerTerm.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<FilteredQuery>
+  <Query>
+    <BooleanQuery fieldName="contents">
+      <Clause occurs="should">
+        <TermQuery>merger</TermQuery>
+      </Clause>
+      <Clause occurs="mustnot">
+        <TermQuery >sumitomo</TermQuery>    
+      </Clause>
+      <Clause occurs="must">
+        <TermQuery>bank</TermQuery>
+      </Clause>
+    </BooleanQuery>
+  </Query>
+  
+  <Filter>
+    <NumericRangeFilter fieldName="date2" upperTerm="19870412"/>
+  </Filter>
+  
+</FilteredQuery>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8eeb5858/lucene/queryparser/src/test/org/apache/lucene/queryparser/xml/NumericRangeFilterQueryWithoutRange.xml
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/org/apache/lucene/queryparser/xml/NumericRangeFilterQueryWithoutRange.xml b/lucene/queryparser/src/test/org/apache/lucene/queryparser/xml/NumericRangeFilterQueryWithoutRange.xml
new file mode 100644
index 0000000..194f62b
--- /dev/null
+++ b/lucene/queryparser/src/test/org/apache/lucene/queryparser/xml/NumericRangeFilterQueryWithoutRange.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<FilteredQuery>
+  <Query>
+    <BooleanQuery fieldName="contents">
+      <Clause occurs="should">
+        <TermQuery>merger</TermQuery>
+      </Clause>
+      <Clause occurs="mustnot">
+        <TermQuery >sumitomo</TermQuery>    
+      </Clause>
+      <Clause occurs="must">
+        <TermQuery>bank</TermQuery>
+      </Clause>
+    </BooleanQuery>
+  </Query>
+  
+  <Filter>
+    <NumericRangeFilter fieldName="date2"/>
+  </Filter>
+  
+</FilteredQuery>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8eeb5858/lucene/queryparser/src/test/org/apache/lucene/queryparser/xml/NumericRangeFilterQueryWithoutUpperTerm.xml
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/org/apache/lucene/queryparser/xml/NumericRangeFilterQueryWithoutUpperTerm.xml b/lucene/queryparser/src/test/org/apache/lucene/queryparser/xml/NumericRangeFilterQueryWithoutUpperTerm.xml
new file mode 100644
index 0000000..38f4583
--- /dev/null
+++ b/lucene/queryparser/src/test/org/apache/lucene/queryparser/xml/NumericRangeFilterQueryWithoutUpperTerm.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<FilteredQuery>
+  <Query>
+    <BooleanQuery fieldName="contents">
+      <Clause occurs="should">
+        <TermQuery>merger</TermQuery>
+      </Clause>
+      <Clause occurs="mustnot">
+        <TermQuery >sumitomo</TermQuery>    
+      </Clause>
+      <Clause occurs="must">
+        <TermQuery>bank</TermQuery>
+      </Clause>
+    </BooleanQuery>
+  </Query>
+  
+  <Filter>
+    <NumericRangeFilter fieldName="date2" lowerTerm="19870409"/>
+  </Filter>
+  
+</FilteredQuery>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8eeb5858/lucene/queryparser/src/test/org/apache/lucene/queryparser/xml/NumericRangeQueryWithoutLowerTerm.xml
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/org/apache/lucene/queryparser/xml/NumericRangeQueryWithoutLowerTerm.xml b/lucene/queryparser/src/test/org/apache/lucene/queryparser/xml/NumericRangeQueryWithoutLowerTerm.xml
new file mode 100644
index 0000000..63e0988
--- /dev/null
+++ b/lucene/queryparser/src/test/org/apache/lucene/queryparser/xml/NumericRangeQueryWithoutLowerTerm.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<BooleanQuery fieldName="contents">
+  <Clause occurs="should">
+    <TermQuery>merger</TermQuery>
+  </Clause>
+  <Clause occurs="mustnot">
+    <TermQuery >sumitomo</TermQuery>    
+  </Clause>
+  <Clause occurs="must">
+    <TermQuery>bank</TermQuery>
+  </Clause>
+  <Clause occurs="must">
+    <NumericRangeQuery fieldName="date2" upperTerm="19870412"/>
+  </Clause>
+</BooleanQuery>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8eeb5858/lucene/queryparser/src/test/org/apache/lucene/queryparser/xml/NumericRangeQueryWithoutRange.xml
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/org/apache/lucene/queryparser/xml/NumericRangeQueryWithoutRange.xml b/lucene/queryparser/src/test/org/apache/lucene/queryparser/xml/NumericRangeQueryWithoutRange.xml
new file mode 100644
index 0000000..63bc6f2
--- /dev/null
+++ b/lucene/queryparser/src/test/org/apache/lucene/queryparser/xml/NumericRangeQueryWithoutRange.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<BooleanQuery fieldName="contents">
+  <Clause occurs="should">
+    <TermQuery>merger</TermQuery>
+  </Clause>
+  <Clause occurs="mustnot">
+    <TermQuery >sumitomo</TermQuery>    
+  </Clause>
+  <Clause occurs="must">
+    <TermQuery>bank</TermQuery>
+  </Clause>
+  <Clause occurs="must">
+    <NumericRangeQuery fieldName="date2"/>
+  </Clause>
+</BooleanQuery>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8eeb5858/lucene/queryparser/src/test/org/apache/lucene/queryparser/xml/NumericRangeQueryWithoutUpperTerm.xml
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/org/apache/lucene/queryparser/xml/NumericRangeQueryWithoutUpperTerm.xml b/lucene/queryparser/src/test/org/apache/lucene/queryparser/xml/NumericRangeQueryWithoutUpperTerm.xml
new file mode 100644
index 0000000..08d04dc
--- /dev/null
+++ b/lucene/queryparser/src/test/org/apache/lucene/queryparser/xml/NumericRangeQueryWithoutUpperTerm.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<BooleanQuery fieldName="contents">
+  <Clause occurs="should">
+    <TermQuery>merger</TermQuery>
+  </Clause>
+  <Clause occurs="mustnot">
+    <TermQuery >sumitomo</TermQuery>    
+  </Clause>
+  <Clause occurs="must">
+    <TermQuery>bank</TermQuery>
+  </Clause>
+  <Clause occurs="must">
+    <NumericRangeQuery fieldName="date2" lowerTerm="19870409"/>
+  </Clause>
+</BooleanQuery>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8eeb5858/lucene/queryparser/src/test/org/apache/lucene/queryparser/xml/TestCoreParser.java
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/org/apache/lucene/queryparser/xml/TestCoreParser.java b/lucene/queryparser/src/test/org/apache/lucene/queryparser/xml/TestCoreParser.java
index 5a1b287..e671a2d 100644
--- a/lucene/queryparser/src/test/org/apache/lucene/queryparser/xml/TestCoreParser.java
+++ b/lucene/queryparser/src/test/org/apache/lucene/queryparser/xml/TestCoreParser.java
@@ -178,11 +178,41 @@ public class TestCoreParser extends LuceneTestCase {
     dumpResults("NumericRangeFilter", q, 5);
   }
 
+  public void testNumericRangeFilterQueryXMLWithoutLowerTerm() throws ParserException, IOException {
+    Query q = parse("NumericRangeFilterQueryWithoutLowerTerm.xml");
+    dumpResults("NumericRangeFilterQueryWithoutLowerTerm", q, 5);
+  }
+
+  public void testNumericRangeFilterQueryXMLWithoutUpperTerm() throws ParserException, IOException {
+    Query q = parse("NumericRangeFilterQueryWithoutUpperTerm.xml");
+    dumpResults("NumericRangeFilterQueryWithoutUpperTerm", q, 5);
+  }
+
+  public void testNumericRangeFilterQueryXMLWithoutRange() throws ParserException, IOException {
+    Query q = parse("NumericRangeFilterQueryWithoutRange.xml");
+    dumpResults("NumericRangeFilterQueryWithoutRange", q, 5);
+  }
+
   public void testNumericRangeQueryXML() throws ParserException, IOException {
     Query q = parse("NumericRangeQuery.xml");
     dumpResults("NumericRangeQuery", q, 5);
   }
 
+  public void testNumericRangeQueryXMLWithoutLowerTerm() throws ParserException, IOException {
+    Query q = parse("NumericRangeQueryWithoutLowerTerm.xml");
+    dumpResults("NumericRangeQueryWithoutLowerTerm", q, 5);
+  }
+
+  public void testNumericRangeQueryXMLWithoutUpperTerm() throws ParserException, IOException {
+    Query q = parse("NumericRangeQueryWithoutUpperTerm.xml");
+    dumpResults("NumericRangeQueryWithoutUpperTerm", q, 5);
+  }
+
+  public void testNumericRangeQueryXMLWithoutRange() throws ParserException, IOException {
+    Query q = parse("NumericRangeQueryWithoutRange.xml");
+    dumpResults("NumericRangeQueryWithoutRange", q, 5);
+  }
+
   //================= Helper methods ===================================
 
   protected String defaultField() {


[2/2] lucene-solr:branch_5_5: LUCENE-7219: Add CHANGES entry

Posted by sa...@apache.org.
LUCENE-7219: Add CHANGES entry


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/f4362098
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/f4362098
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/f4362098

Branch: refs/heads/branch_5_5
Commit: f4362098f7290104205403b86e901c767c0c4d22
Parents: 8eeb585
Author: Steve Rowe <sa...@apache.org>
Authored: Wed Jun 15 17:32:43 2016 -0400
Committer: Steve Rowe <sa...@apache.org>
Committed: Wed Jun 15 17:32:43 2016 -0400

----------------------------------------------------------------------
 lucene/CHANGES.txt | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/f4362098/lucene/CHANGES.txt
----------------------------------------------------------------------
diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt
index 113bc55..f41aa99 100644
--- a/lucene/CHANGES.txt
+++ b/lucene/CHANGES.txt
@@ -26,6 +26,10 @@ Bug fixes
 * LUCENE-7279: JapaneseTokenizer throws ArrayIndexOutOfBoundsException
   on some valid inputs (Mike McCandless)
 
+* LUCENE-7219: Make queryparser/xml (Point|LegacyNumeric)RangeQuery builders
+  match the underlying queries' (lower|upper)Term optionality logic.
+  (Kaneshanathan Srivisagan, Christine Poerschke)
+
 ======================= Lucene 5.5.0 =======================
 
 New Features