pysolr

Pysolr search multiple queries with and


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.


Solution

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

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