英文:
Pysolr search multiple queries with and
问题
如何搜索多个查询并需要&q.op中的“and”?
import pysolr
solr = pysolr.Solr('..url../solr/'+name, always_commit=True)
solr.search('test:test AND url:http://test.com')
我想要在"AND" q.op参数中添加对"url:http://test.com"的搜索。
英文:
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
得分: 0
我将很快测试这个,但目前看起来像是:
solr.search("test:'test'\nurl:'http://test.com'", {
'q.op':'AND'
})
英文:
I will test this soon, but currently it looks like:
solr.search("test:'test'\nurl:'http://test.com'",**{
'q.op':'AND'
})
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。


评论