Empty return when specifying defType and qf

36 views
Skip to first unread message

hhc

unread,
Dec 2, 2014, 4:00:05 AM12/2/14
to sol...@googlegroups.com
Hi all,

May I ask how to define qf (query field) by solrpy?

Details: 

I can see some returns when submitting a query like this in my browser:


However, when using solrpy, the following command found no matches

>> solr_conn.raw_query(q='aaa', defType='dismax', qf="f1+f2", fl="*,score", wt='json')

Output: '{"responseHeader":{"status":0,"QTime":0,"params":{"fl":"*,score","q":"aaa","qf":"f1+f2","wt":"json","defType":"dismax"}},"response":{"numFound":0,"start":0,"maxScore":0.0,"docs":[]}}\n'

If I remove defType and qf parameters, I can get some returns.

>> solr_conn.raw_query(q='aaa', fl="*,score", wt='json')

Output: '{"responseHeader":{"status":0,"QTime":1,"params":{"fl":"*,score","q":"aaa","wt":"json"}},"response":{"numFound":3,"start":0,"maxScore":0.77980787,"docs":[{"id":"4","f1":"aaa bbb","f2":"eee fff","_version_":1486358763711496192,"score":0.77980787},{"id":"5","f1":"aaa bbb","f2":"ggg hhh","_version_":1486358775175577600,"score":0.77980787},{"id":"7","f1":"eee fff","f2":"aaa bbb","_version_":1486366859876892672,"score":0.77980787}]}}\n'

Anyone has suggestions on this?  Thanks!
Reply all
Reply to author
Forward
0 new messages