• Resolved Chris Whiteley

    (@thewhite)


    I have an issue where “Search Bigger with WPSOLR” is displaying pagination incorrectly. It is showing a higher number of pages then there are for the search results.

    The pagination works correctly with the “Search Bigger with WPSOLR” plugin deactivated.

    For example, when I do a specific search on the site without “Search Bigger with WPSOLR”activated I get the correct number of pages: 624. When I enable “Search Bigger with WPSOLR” I get 1343 page results and “no posts match your criteria” after page 624.

    Can someone please offer an idea of how to solve this

    https://www.ads-software.com/plugins/wpsolr-search-engine/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author WPSolr free

    (@wpsolr)

    Just made tests.

    I could not reproduce your count issue.

    Try to use the same “Number of results by page” as your theme do when wpsolr is not activated.

    Thread Starter Chris Whiteley

    (@thewhite)

    Everything is set to show 10 posts per page. In the Solr settings, within General>Reading and within the Template page.

    Is there any reason why would be showing double the number of pages needed for the search results?

    Plugin Author WPSolr free

    (@wpsolr)

    No idea.

    Try clear and reindex all your data.

    Thread Starter Chris Whiteley

    (@thewhite)

    I reindexed all the data and it did not solve the issue.

    I realized it might be an issue with how I have customized my search results page, so I ran a test using a simple index.php page and it showed all the results.

    My challenge is that I need a customized search results page to show the Solr results. When I use wp_query to adjust how the search results are shown, this is when the pagination doesn’t line up with the number of results.

    Here is an example on one of the wp_query I am using:

    $key = 's';
        $current = $s;
    	$paged = ( get_query_var('paged') ) ? get_query_var('paged') : 1;
      $args = array(
    	//'posts_per_page'        => '10',
    	'order'                 => 'ASC',
    	'orderby'               => 'title',
    	'post_type'             => 'ad_listing',
    	'paged'          => $paged,
    	$key => $current

    I realize that I could use the Solr search templates for showing the results, but the layout is heavily customized, and it shows a lot of custom fields.
    Can I use the wp_query with Solr to create a customized search results page?`

    Plugin Author WPSolr free

    (@wpsolr)

    No support of custom code.

    Thread Starter Chris Whiteley

    (@thewhite)

    I understand not supporting custom code, but can you let me know if I can use wp_query with the results?

    or

    Can you point me in a direction of how to customize the templates then?

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Solr Pagination Count Issues’ is closed to new replies.