I'm trying to setup the ability to make requests to Solr via ajax calls and I'm running into some issues on how this module depends on the current state of the URL. There are a number of issues I'm grappling with here, but I opened this issue to specifically address the pager. In apachesolr_search_search_results(), a call is made to apachesolr_search_run(). The 4th parameter is for the page number of the result set. However, the call uses pager_find_page(). This core function just looks for a page in the GET parameters. Due to limitations in the Drupal ajax framework, I am only able to make POST requests, so I can't actually set page as a parameter in the request.

Instead, I am reading it from the form_state['values'] element from my submitted ajax element. My request here is that we add an option in the $conditions parameter in apachesolr_search_search_results(). Which would basically change the code to look something like this.

        $page = isset($conditions['page']) ? $conditions['page'] : pager_find_page();
        $results = apachesolr_search_run('apachesolr', $params, $solrsort, $search_page['search_path'], $page, $solr, $context);

Comments

bburg created an issue.