Closed (duplicate)
Project:
Apache Solr Search
Version:
5.x-1.0-alpha5
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
2 Feb 2009 at 23:15 UTC
Updated:
30 Apr 2010 at 21:07 UTC
Hey Guys,
The installation of apachesolr module and Apache Solr itself went amazingly smooth. However, I'm only returned 10 search results without the paging bar at the bottom. Any ideas why this may be or where in the code to look for the problem?
Thanks
Comments
Comment #1
paradigmshifter commentedI see that the pager_query is being called on line 147 of apachesolr_search.module :
And with my Devel module and IDE I see that the query being called is:
(75 being the $total) Is this how the query is supposed to look? No pager shows up even though a core search on the "Content" tab of search does show a pager... Very bizarre.
Comment #2
paradigmshifter commentedAm I the only one who is experiencing this problem in Drupal 5?
When I change the pager_query to something that makes more sense (for testing only):
pager_query("SELECT * FROM users", $params['rows'], 0, NULL);The pager shows up... So the problem must be that the pager_query doesn't know how to interpret
pager_query("SELECT %d", $params['rows'], 0, NULL, $total);Is there another way to give the pager_query the total?
Comment #3
paradigmshifter commentedThis may not be the best solution but I decided to take the important parts of the pager_query function and use them within apachesolr_search_search()
To the top of the function I added:
global $pager_page_array, $pager_total, $pager_total_items;I then replaced:
pager_query("SELECT %d", $params['rows'], 0, NULL, $total);With:
Comment #4
damien_vancouver commented@paradigmshifter,
Did you solve this problem?
I cannot replicate on my production sites or on a test site with just the basics installed and 12 test posts. (when I search a common term on all I see the correct 2 page pager, even using the default Bluemarine theme.
Please let me know if you're still having trouble? Thanks.
Comment #5
jpmckinney commented#667110: Replace bogus use of pager_query()