Example usage for org.apache.lucene.spatial.query SpatialOperation toString

List of usage examples for org.apache.lucene.spatial.query SpatialOperation toString

Introduction

In this page you can find the example usage for org.apache.lucene.spatial.query SpatialOperation toString.

Prototype

@Override
    public String toString() 

Source Link

Usage

From source file:org.apache.jena.query.spatial.SpatialIndexSolr.java

License:Apache License

@SuppressWarnings("deprecation")
private SolrDocumentList solrQuery(Shape shape, int limit, SpatialOperation operation) {
    SolrQuery sq = new SolrQuery();
    sq.setQuery("*:*");
    sq.setFilterQueries(docDef.getGeoField() + ":\"" + operation.toString() + "("
            + SpatialQuery.ctx.toString(shape) + ") distErrPct=0\"");
    //System.out.println("SolrQuery: " +sq.toString());
    try {/*  w  w  w .java  2 s.  c  o m*/
        QueryResponse rsp = solrServer.query(sq);
        SolrDocumentList docs = rsp.getResults();
        return docs;
    } catch (SolrServerException e) {
        exception(e);
        return null;
    }
}