• I’m using this method (https://www.relevanssi.com/knowledge-base/found-posts/) to show the number of results. The number of results displayed is incorrect. I’m getting the number ’18’ results from $wp_query->found_posts when the actual number is 9 in one example. Do you know what might cause this? I’m not seeing the issue when I disable Relevanssi although I’m not getting as many results because of the use of custom fields. I would of course prefer to use the plugin. Any ideas?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Mikko Saari

    (@msaari)

    Well, if $wp_query->found_posts says 18, that means Relevanssi has found 18 results. Are you sure that’s not the right number? Can it be your theme is only showing 9 of those 18 results? When debugging things like these, it’s often a good idea to check what the admin search (Dashboard > Admin search) shows –?does it show 9 or 18 results?

    Thread Starter daviswebstudio

    (@daviswebstudio)

    I found that the Ajax load more button just doesn’t always load all of the ones found, it loads about half. That would normally indicate that the problem is with the Load More button except I couldn’t recreate the issue with the Relevanssi plugin disabled. Still trying to figure this one out.

    Plugin Author Mikko Saari

    (@msaari)

    If you have some kind of Ajax search, it’s possible it doesn’t use Relevanssi at all.

    The Relevanssi admin search will show you exactly what Relevanssi finds, and if your Ajax search returns something else, then it’s not running Relevanssi.

    Thread Starter daviswebstudio

    (@daviswebstudio)

    I’m not using an Ajax search, just a View More button that loads Page 2 of the results and so on. If there’s nothing Relevanssi related you can think of I might have done wrong this ticket could probably be closed. I appreciate your input.

    Plugin Author Mikko Saari

    (@msaari)

    The View More button is an Ajax search, it uses Javascript to load in the new posts, and it may be incompatible with Relevanssi. Again: check with the Relevanssi admin search and compare the results. If they are the same, then yes, those are Relevanssi results and this may be a Relevanssi problem, but if they are different, then the problem is that the search results are not from Relevanssi.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Incorrect Number of Results’ is closed to new replies.