This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Incorrect total result count

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Incorrect total result count

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #48889
    pbainespbaines
    Participant

    Hi,

    We’re seeing an Incorrect total result count, dependent on filters applied. I believe its {results_count_total}.

    You’ll see from the video, we have well over 1000 pieces of content across the multisite, but the total count doesn’t seem to take this into account.

    Is this a bug, or is there some way we can correct the count?

    We’re using the index table engine if that helps.

    Thanks,

    Peter

    • This topic was modified 1 year, 10 months ago by pbaines.
    #48905
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi,

    It is sort of a bug but also by intention. The plugin will try to calculate the possible results matched by the current filter setup. However on multisite it’s a bit different as it requires multiple blog switches and many other very resource heavy things.
    So there is a “guessing” algorithm involved to help out the peformance, and it is unfortunately in these cases not very accurate. If the fully correct count was calculated, that would very likely bring down the website as it takes too much time. It sounds stupid I know, but it is what it is.

    #48906
    pbainespbaines
    Participant

    Thanks Earnest, I get that this search is already quite resource-heavy, so in some ways this does make sense. Please keep us posted if you do find another less resource-heavy method of getting this count, but in the meantime, we’ll look into other options.

    #48907
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Sure!

    There is going to be a minor bugfix in the upcoming release today/tomorrow regards the results count, but I don’t think it will affect this.

    #48912
    pbainespbaines
    Participant

    Thanks Earnest,

    Just out of interest, would we be able to apply a temp fix for this using the javascript API and getting the result count?

    My thoughts are…

    Search, if load more button does not appear, results count message will read Showing X results

    Search, if load more button does appear, results count message will read Showing first X results

    I’ve been trying to tap in to the search using the javascript API but can’t seem to get a result count from anywhere. Perhaps you could point me in the right direction?

    #48914
    Ernest MarcinkoErnest Marcinko
    Keymaster

    I’m afraid that wouldn’t work very well, because the text itself is changed via javascript, usually creating conflicts with that is not a good idea.

    I would rather suggest using either one or the other variation.

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.