Is it possible to search in Solr over two fields using two different words and get back only those results which contain both of them?
For example, if I have fields
The suggested solutions have the drawback, that you have to care about escaping special characters. If the user searches for "type:d'or AND location:coffee break" the query will fail.
I suggest to combine two edismax handlers:
(_query_:"{!edismax qf='type' v=$uq1}"
AND _query_:"{!edismax qf='location' v=$uq2}")
Call the request handler like this:
http://localhost:8983/solr/collection1/combine?uq1=furniture&uq2=office
Explanation
Solr Docs
https://wiki.apache.org/solr/LocalParams