Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › products dont appear to search pro suggestions too quickly › Reply To: products dont appear to search pro suggestions too quickly
Thank you for the proper details. I may have an idea why those items are not showing up as they supposed to.
So, the index table reports that every product object is indexed, which seems to be correct. What I noticed is however that the ‘lou reed’ text is stored within a custom field named ‘pa_esittaja’. That is strange, because it should be indexed, and it should return it as a result, as it is selected for indexing.
However you mentioned that the items are getting imported – and that may be one of the causes of the issue. The plugin indexes each item whenever it is created, when WordPress sends a ‘save_post’ signal. On that signal, ajax search pro parses through all the selected fields, and stores them in the index table. However, some import tools does not import all the information at once, but create the object (then immediately send the signal), store it and then add the additional information (custom fields, taxonomy terms etc..) to the database. In this case however the ‘signal’ is too early, and not all the information is available yet. The search will not find the additional information during the CRON job, as it is already marked as indexed, and it cannot go thourgh all the recent items, as it would take minutes/hours of wasted server time. This could explain why the ‘lou reed’ yielded no results, as that custom field was not yet available when indexing.
I did the following to try to resolve this issue:
– I have disabled the ‘save on post’ feature: https://i.imgur.com/tGu5hx0.png
This will make sure that the items are not indexed upon creation, but later on during a cron job. It will also prevent the missing information due to the early signal.
– I have also recreated the index table, which now should be correct. Previously it contained around 172k records, now it’s over 333k, so there was missing informatio there.
This will hopefully prevent the issue from re-occuring. Please also note that you have a search query cache enabled and set to 1 day to expire, so new items for the same phrase may take up to 1 day to appear.
I hope this helps!Best,
If you like my products, don't forget to rate them on codecanyon :)