use of org.apache.lucene.queryparser.xml.ParserException in project lucene-solr by apache.
the class TestLegacyNumericRangeQueryBuilder method testGetFilterHandleNumericParseErrorStrict.
public void testGetFilterHandleNumericParseErrorStrict() throws Exception {
LegacyNumericRangeQueryBuilder filterBuilder = new LegacyNumericRangeQueryBuilder();
String xml = "<LegacyNumericRangeQuery fieldName='AGE' type='int' lowerTerm='-1' upperTerm='NaN'/>";
Document doc = getDocumentFromString(xml);
try {
filterBuilder.getQuery(doc.getDocumentElement());
} catch (ParserException e) {
return;
}
fail("Expected to throw " + ParserException.class);
}
Aggregations