hi, I'm using solr 4.3, I have indexed docs with a polygon field, and I'd
like to search the polygon docs according to the given point.
I've put the jts-1.13.jar into the WEB-INF/lib directory, and I've added the
doc to solr successfully.  I'm new to lucene and solr, I'm not sure how to
query indexed docs in java, any help would be appreciated.
scheme.xml: 
<fieldType name="location_rpt"
class="solr.SpatialRecursivePrefixTreeFieldType"
spatialContextFactory="com.spatial4j.core.context.jts.JtsSpatialContextFactory"
distErrPct="0.025"
maxDistErr="0.000009"
units="degrees"
/>
<field name="geo" type="location_rpt" indexed="true" stored="true"
multiValued="true" />

java code:
String sql = "indexType:219" " AND "
"geo:Contains(POINT(114.078327401257,22.5424866754136))";
SolrQuery query = new SolrQuery();
query.setQuery(sql);
QueryResponse rsp = server.query(query);
SolrDocumentList docsList = rsp.getResults();
Then I got an error at "java.lang.IllegalArgumentException: missing parens:
Contains". Is there any suggestion?



--
View this message in context: 
http://lucene.472066.n3.nabble.com/How-to-query-docs-with-an-indexed-polygon-field-in-java-tp4065512.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to