0

Apache Solr Search Version: 6.x-2.x-dev

I am using hook_apachesolr_process_results() to modify results of search. This returns fewer results than are indicated by displayed filters. Pagination is also configured for original search results, not those modified by hook.

My question is: Is there a way to modify the pagination due to modified results totals without deleting the excluded nodes from the index?

For example, if I execute search A, my pagination is set for a total of 100 results on 10 pages listing 10 results per page.

When the results of this search are modified by hook_apachesolr_process_results(), I now actually have only 15 results. But, my pagination is still set for 100 results.

I want to know how to reset the pagination for a total 15 results.

Thanks for any assistance anyone can provide.

1 Answer 1

0

Instead of using hook_apachesolr_process_results() I figured it was better to use hook_apachesolr_update_index instead.

Following the guidance here: http://www.phase2technology.com/blog/filtering-apache-solr-search-results-based-on-dynamic-fields/

I am now able to create a filter using hook_apachesolr_modify_query that will return the correct results and pagination.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.