小编eph*_*han的帖子

Sunburnt solr通配符*:*

我需要一种使用solr通配符的方法:在sunburnt solr中还是有另一种方法从索引中指定'所有文档'然后再精炼.这是代码

....
si = sunburnt.SolrInterface(url=solr_url,http_connection=h)
search_terms = {SEARCH_TERMS_COMIN_FROM_A_FORM}

#!This is where I need help!
result = si.query(WILDCARD)#I need all the docs from the index

#then I can do this
if search_terms['province']:
    result = result.query(province=search_terms['province'])
if search_terms['town']:
    result = result.query(town=search_terms['town'])
.......#two other similar if statement blocks
#finally
results = result.execute()
Run Code Online (Sandbox Code Playgroud)

python solr sunburnt

3
推荐指数
1
解决办法
331
查看次数

标签 统计

python ×1

solr ×1

sunburnt ×1