Question
I am using pysolr-2.0.15 api for SOLR searching
mysite:8983/solr/select/?q=disease&fq=url:"pediatric"&version=2.2&start=0&rows=10&indent=on
This SOLR query gives me successfull result
I want to implement this using pysolr search function
I am trying this one
results = conn.search('disease "url:Pediatric"')
But results are not correct.
Another problem is search method returns only 10 records how can i get all search results.
Can anyone help me out?
Solution
You should pass the fq
and rows
as arguments:
results = conn.search('disease', fq='url:Pediatric', rows=100)
Note that you can pass multiple fq parameters:
filter_queries = ['url:Pediatric', 'otherparam:othervalue']
results = conn.search('disease', fq=filter_queries, rows=100)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow