Query parsedQuery = queryParser.parse(query).query();
assertThat(parsedQuery, instanceOf(DeletionAwareConstantScoreQuery.class));
DeletionAwareConstantScoreQuery constantScoreQuery = (DeletionAwareConstantScoreQuery) parsedQuery;
GeoDistanceFilter filter = (GeoDistanceFilter) constantScoreQuery.getFilter();
assertThat(filter.fieldName(), equalTo("location"));
assertThat(filter.lat(), closeTo(40, 0.00001));
assertThat(filter.lon(), closeTo(-70, 0.00001));
assertThat(filter.distance(), closeTo(12, 0.00001));
}
@Test public void testGeoBoundingBoxFilterNamed() throws IOException {