Query parsedQuery = queryParser.parse(termQuery("age", 34).boost(2.0f)).query();
assertThat(parsedQuery, instanceOf(NumericRangeQuery.class));
NumericRangeQuery fieldQuery = (NumericRangeQuery) parsedQuery;
assertThat(fieldQuery.getMin().intValue(), equalTo(34));
assertThat(fieldQuery.getMax().intValue(), equalTo(34));
assertThat(fieldQuery.includesMax(), equalTo(true));
assertThat(fieldQuery.includesMin(), equalTo(true));
assertThat((double) fieldQuery.getBoost(), closeTo(2.0, 0.01));
}
@Test