lucene/src/main/java/com/orientechnologies/spatial/strategy/SpatialQueryBuilderOverlap.java
@Override
  public OSpatialQueryContext build(Map<String, Object> query) throws Exception {
    Shape shape = parseShape(query);
    SpatialStrategy strategy = manager.strategy();
    SpatialArgs args = new SpatialArgs(SpatialOperation.Intersects, shape.getBoundingBox());
    Query filterQuery = strategy.makeQuery(args);
    BooleanQuery q = new BooleanQuery.Builder().add(filterQuery, BooleanClause.Occur.MUST)
        .add(new MatchAllDocsQuery(), BooleanClause.Occur.SHOULD).build();

    return new OSpatialQueryContext(null, manager.searcher(), q);
  }
@Override
  public OSpatialQueryContext build(Map<String, Object> query) throws Exception {
    Shape shape = parseShape(query);
    SpatialStrategy strategy = manager.strategy();
    SpatialArgs args = new SpatialArgs(SpatialOperation.Intersects, shape.getBoundingBox());
    Query filterQuery = strategy.makeQuery(args);
    BooleanQuery q = new BooleanQuery.Builder().add(filterQuery, BooleanClause.Occur.MUST)
        .add(new MatchAllDocsQuery(), BooleanClause.Occur.SHOULD).build();

    return new OSpatialQueryContext(null, manager.searcher(), q);
  }
@ Override public OSpatialQueryContext build ( Map < String , Object > query ) throws Exception { Shape shape = parseShape ( query ) ; SpatialStrategy strategy = manager . strategy ( ) ; SpatialArgs args = new SpatialArgs ( SpatialOperation . Intersects , shape . getBoundingBox ( ) ) ; Query filterQuery = strategy . makeQuery ( args ) ; BooleanQuery q = new BooleanQuery . Builder ( ) . add ( filterQuery , BooleanClause . Occur . MUST ) . add ( new MatchAllDocsQuery ( ) , BooleanClause . Occur . SHOULD ) . build ( ) ; return new OSpatialQueryContext ( null , manager . searcher ( ) , q ) ; }
TODO check PGIS
TODO check PGIS