You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by cp...@apache.org on 2016/04/18 15:56:55 UTC
lucene-solr:branch_5x: 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_5x 352e9a705 -> d268aef0e
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/d268aef0
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/d268aef0
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/d268aef0
Branch: refs/heads/branch_5x
Commit: d268aef0ebd89901e8f91ae423ca606fbec7226e
Parents: 352e9a7
Author: Christine Poerschke <cp...@apache.org>
Authored: Mon Apr 18 09:58:38 2016 +0100
Committer: Christine Poerschke <cp...@apache.org>
Committed: Mon Apr 18 14:20:05 2016 +0100
----------------------------------------------------------------------
.../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/d268aef0/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/d268aef0/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/d268aef0/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/d268aef0/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/d268aef0/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/d268aef0/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/d268aef0/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/d268aef0/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/d268aef0/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 bbff0e3..423c038 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
@@ -143,11 +143,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() {