Pysolr search multiple queries with and

155 Views Asked by At

How to search multiple queries and require the "and" for q.op?

import pysolr
solr = pysolr.Solr('..url../solr/'+name,always_commit=True)
solr.search("test:test")

I want to add searching for also "url:http://test.com" as an "AND" q.op parameter.

1

There are 1 best solutions below

0
msj121 On BEST ANSWER

I will test this soon, but currently it looks like:

solr.search("test:'test'\nurl:'http://test.com'",**{
    'q.op':'AND'
})