Forums › Forums › Search & Filter Pro › Search results too few
- This topic has 6 replies, 2 voices, and was last updated 10 years, 11 months ago by
Anonymous.
-
Anonymous(Private) November 30, 2015 at 5:52 pm #31045
Hi, we’ve an official license of S&F pro. After using a filter, the search results are too few.
You can see it here:
1) go to http://preview.in-trim.carerixsite.nl/category/vacatures/
2) click on “functiegroep -> bouw (5)”. The results should be 5
3) note that only 1 result is displayedFurthermore I’ve tried it in a basic theme (like twentyfourteen), but that doesn’t matter.
Hope to hear from you soon!
Ross Moderator(Private) November 30, 2015 at 6:23 pm #31049Hi Ruben
What happens when you enable Auto Count? (found in the general tab)
Thanks
Anonymous(Private) November 30, 2015 at 6:43 pm #31050Hi Ross,
Thank you for your quick reply.
Now the filter count is decreased to 1. So it matches the result count, but that’s still incorrect. There should be 5 hits. If I look it up in wp-admin the result count is correct.
When I open a ‘missing’ post in wp-admin and hit save/apply (without further changes), it does get found by search&filter. So somehow “fresh” posts aren’t spot by S&F pro.I can give you a wp login if you like.
Best Regards,
RubenRoss Moderator(Private) December 1, 2015 at 7:02 pm #31155Hey Ruben
How are you adding these posts to your database? Via the standard WP admin screen, or via some other function?
Thanks
Anonymous(Private) December 2, 2015 at 1:50 pm #31232Hi Ross,
They are imported by a another plugin automatically. Without “auto count” the correct number of posts are listed in the widget (of course not in the search results).
I think it’s a tiny issue somewhere in the code.Searching & filtering in wp-admin is fine, so to me the posts it selves are OK.
Also the free version of S&F seems to work OK.I hope you can help me.
Best Regards,
RubenRoss Moderator(Private) December 2, 2015 at 3:03 pm #31244Hey Ruben
When posts are added in a non-standard way, the Search & Filter cache is not aware there is an updated post – so it doesn’t update the cache.
The cache is a new feature that enables a ton of extra functions that are not available in Free.
There is a function which should help overcome this:
do_action('search_filter_update_post_cache', 1984);You must add the above code for every post import – replacing the
1984with the post ID of the post updated – or with a variable containing the post id:do_action('search_filter_update_post_cache', $post->ID);The plugin you use for importing will likely have some function, or hook made available after every insert – its at this point you should add the above code.
Thanks
-
AuthorPosts