public void testPropertyIsLessThanOrEqualToParse() throws Exception { FilterMockData.propertyIsLessThanOrEqualTo(document, document); PropertyIsLessThanOrEqualTo equalTo = (PropertyIsLessThanOrEqualTo) parse(); assertNotNull(equalTo); assertNotNull(equalTo.getExpression1()); assertNotNull(equalTo.getExpression2()); }
@Override public Object visit(PropertyIsLessThanOrEqualTo filter, Object extraData) { Expression[] expr = binaryFilterVisitorNormalizer(filter.getExpression1(), filter.getExpression2()); StringWriter output = asStringWriter(extraData); ExpressionToSolr visitor = new ExpressionToSolr(); PropertyName propertyName = (PropertyName) expr[0]; propertyName.accept(visitor, output); output.append(":[* TO "); expr[1].accept(visitor, output); output.append("]"); return output; }