Hi Kevenz,

kevenz wrote
> ...
> String sql = "indexType:219" " AND "
> "geo:Contains(POINT(114.078327401257,22.5424866754136))";
> ...
> Then I got an error at "java.lang.IllegalArgumentException: missing
> parens: Contains". Is there any suggestion?

First of all, if your query shape is a point, then use Intersects, which
semantically equivalent but works much faster.  One error in your query is
that your quotes look messed up.  Another is that you used a comma to
separate the X and Y when you should use a space (because you are using WKT
syntax via POINT).  Try this:

   indexType:219 AND geo:"Contains(POINT(114.078327401257
22.5424866754136))"

This will also work using lat comma lon non-WKT syntax:

   indexType:219 AND geo:"Contains(22.5424866754136, 114.078327401257)"

Disclaimer: I didn't run these, I just typed them in the email.

~ David



-----
 Author: http://www.packtpub.com/apache-solr-3-enterprise-search-server/book
--
View this message in context: 
http://lucene.472066.n3.nabble.com/How-to-query-docs-with-an-indexed-polygon-field-in-java-tp4065512p4065550.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to