0

I would like to manipulate the order of the results in an Apache Solr search result.

I'm using apachesolr together with apachesolr_panels. In hook_apachesolr_process_results() I can get the $results for the current page, but I'm looking for a way to find the full list prior to pagination.

Edit: I'm asking about the result set as I'm not in control of the solr server and can't manipulate the XML file.

1

Yes and no. In any sane situation, it is the solr server that is handling the pagination. In essence, the server receives parameters, rows and start that tell it which "page" it will send.

You could write custom code that would get you all the rows but that would require at keast one more query to the solr server. The first query (the default one) would find out how many results there are in total; the second one would fetch the whole set, setting rows to the total amount and start to 0.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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