I'd like to send a query to Local Solr. Currently I'm send开发者_如何学运维ing this:
http://localhost:9001/solrfacetsearch/master_Shop/select/?q=keyword_text_mv%3Aapple&version=2.2&start=0&rows=10&indent=on&qt=geo&lat=52.398&long=4.93653&radius=2000&debugQuery=true.
As you can see, the query is keyword_text_mv : apple
I'd like to send apple AND orange
.
How would I write this? Would the following be ok?
http://localhost:9001/solrfacetsearch/master_Shop/select/?q=keyword_text_mv%3Aapple AND orange&version=2.2&start=0&rows=10&indent=on&qt=geo&lat=52.398&long=4.93653&radius=2000&debugQuery=true
I find it much easier just to use bracket based logical grouping together with boolean statements, in other words your query would turn in to:
keyword_text_mv:(apple AND orange)
however this is a bit weird, not sure something can have two values at the same time? I think you might be looking for:
keyword_text_mv:(apple OR orange)
perhaps?
There are different ways. For example:
- use the +apple +orange
- or set the default Option with q={!lucene q.op=AND df=keyword_text_mv}
->Follow the link, posted by zeropage, which is helpful -> http://wiki.apache.org/solr/SolrQuerySyntax
精彩评论