Search in sources :

Example 1 with GeoPointInPolygonQuery

use of org.apache.lucene.spatial.geopoint.search.GeoPointInPolygonQuery in project elasticsearch by elastic.

the class PlainHighlighterTests method testGeoPointInPolygonQueryHighlighting.

public void testGeoPointInPolygonQueryHighlighting() throws IOException, InvalidTokenOffsetsException {
    double[] polyLats = new double[] { 0, 60, 0, 0 };
    double[] polyLons = new double[] { 0, 60, 90, 0 };
    Query geoQuery = new GeoPointInPolygonQuery("geo_point", polyLats, polyLons);
    checkGeoQueryHighlighting(geoQuery);
}
Also used : Query(org.apache.lucene.search.Query) PhraseQuery(org.apache.lucene.search.PhraseQuery) GeoPointDistanceQuery(org.apache.lucene.spatial.geopoint.search.GeoPointDistanceQuery) TermQuery(org.apache.lucene.search.TermQuery) BooleanQuery(org.apache.lucene.search.BooleanQuery) GeoPointInBBoxQuery(org.apache.lucene.spatial.geopoint.search.GeoPointInBBoxQuery) GeoPointInPolygonQuery(org.apache.lucene.spatial.geopoint.search.GeoPointInPolygonQuery) GeoPointInPolygonQuery(org.apache.lucene.spatial.geopoint.search.GeoPointInPolygonQuery)

Aggregations

BooleanQuery (org.apache.lucene.search.BooleanQuery)1 PhraseQuery (org.apache.lucene.search.PhraseQuery)1 Query (org.apache.lucene.search.Query)1 TermQuery (org.apache.lucene.search.TermQuery)1 GeoPointDistanceQuery (org.apache.lucene.spatial.geopoint.search.GeoPointDistanceQuery)1 GeoPointInBBoxQuery (org.apache.lucene.spatial.geopoint.search.GeoPointInBBoxQuery)1 GeoPointInPolygonQuery (org.apache.lucene.spatial.geopoint.search.GeoPointInPolygonQuery)1