Closed (fixed)
Project:
Search API Solr
Version:
7.x-1.0-rc4
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
24 Apr 2013 at 19:43 UTC
Updated:
9 May 2013 at 20:10 UTC
Hello,
Something changed between rc3 and rc4 that has introduced a problem in our code. We are creating a solr search api query, adding some filters to it, and then executing the query. In rc3, we would get back all results. In rc4 we are only getting 10 results, though the result count is much higher. Is there an option we can set on the query to make sure we get back all results.
Psuedocode for our process:
$solr_query = search_api_query('foo_index');
$filter = $solr_query->createFilter('OR');
$filter->condition(...);
$solr_query->filter($filter);
$solr_results = $solr_query->execute();
In $solr_results, the $solr_results['result count'] is the same in rc3 and rc4, but the $solr_results['results'] array only has 10 results in rc4 instead of all results as it was in rc3.
Comments
Comment #1
onelittleant commentedOK, I figured out to add $solr_query->setOption('limit', 999999);
Thanks!
Comment #2
drunken monkeyNo, you were right, that was actually a bug. It should be fixed now.