You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Kyle Lee <ra...@gmail.com> on 2011/07/01 20:42:07 UTC
bbox query syntax
Hello all,
What are we doing incorrectly with this query?
http://10.0.0.121:8080/solr/select?q=(description:rifle)&fq=(transactionDate:[NOW-30DAY/DAYTO
NOW/DAY] AND {!bbox sfield=storeLocation pt=32.73,-96.97 d=20})
If we leave the transactionDate field out of the filter query string, the
query works as expected. However, when we include the BBOX clause, we get a
parser error.
Any help figuring out the correct syntax would be appreciated.
Thanks,
Kyle
Re: bbox query syntax
Posted by "David Smiley (@MITRE.org)" <DS...@mitre.org>.
Hi.
By the way, your uses of parenthesis are completely superfluous.
You can't just plop that "{!" syntax anywhere you please, it only works at
the beginning of a query to establish the query parser for the rest of the
string and/or to set "local-params". There is a sub-query hacky syntax:
... AND _query_:"{!bbox sfield=storeLocation pt=32.73,-96.97 d=20}". But in
your case, I would simply use a second filter query: fq={!bbox
sfield=storeLocation pt=32.73,-96.97 d=20}
And by the way, you forgot to round down your first "NOW" to the day.
~ David
-----
Author: https://www.packtpub.com/solr-1-4-enterprise-search-server/book
--
View this message in context: http://lucene.472066.n3.nabble.com/bbox-query-syntax-tp3130329p3131458.html
Sent from the Solr - User mailing list archive at Nabble.com.