Forum Replies Created
-
AuthorPosts
-
Ernest Marcinko
KeymasterYou cannot access this content.
June 7, 2024 at 9:09 am in reply to: PDFs not being read and made searchable after creating Index #48407Ernest Marcinko
KeymasterYou cannot access this content.
Ernest Marcinko
KeymasterYou cannot access this content.
Ernest Marcinko
KeymasterYou cannot access this content.
Ernest Marcinko
KeymasterYou cannot access this content.
Ernest Marcinko
KeymasterYou cannot access this content.
Ernest Marcinko
KeymasterHi,
Thank you for the details, it helps a lot!
The only issue was, that the primary source of the content field by default is the excerpt field, which in this case is auto generated and contains the “gibberish” trimmed from the original content.
By changing the primary field from excerpt to post content seemed to resolve the issue.
Ernest Marcinko
KeymasterYou cannot access this content.
June 6, 2024 at 9:13 am in reply to: I need to configure the search with search box and filter in one row. #48392Ernest Marcinko
KeymasterThank you very much for your rating!
Interesting, I tried to debug this, but I can’t see any difference within the handlers, it must be something I’m not seeing. My guess there is something else also involved, but the debug tools see no difference in output.
Can you please check you have the latest update installed? From the front-end it looks like it’s not the latest version. It should be 4.26.11
Just to make sure it’s not something that was already fixed.June 6, 2024 at 8:45 am in reply to: PDFs not being read and made searchable after creating Index #48390Ernest Marcinko
KeymasterHi,
Thank you for the details!
I have logged in to check the configuration, and I found the issue. The PDF files were not selected, nor the option to index their contents. I have enabled that for you here: https://i.imgur.com/SJPHRWY.png
Now all you need to do is to click the Continue Index button, and keep the tab open likely for a couple of hours until the index fully finishes: https://i.imgur.com/TYmTQNB.png
Ernest Marcinko
KeymasterYou cannot access this content.
Ernest Marcinko
KeymasterYou cannot access this content.
Ernest Marcinko
KeymasterHi Levon,
wp_insert_post is fine, but it’s only called whenever a post is created. I guess the tags are added separately after the post was inserted to the database, and that does not trigger a “save_post” action – and in that case the index is not triggered to update with the added tags.
After adding the tags is complete calling thedo_action( ‘save_post’, $post_id, $post, $update );once more is going to fix that.
It’s a common issue with generated posts, and unfortuantely we can’t add a hook to trigger on tag addition, as it would require of rebuilding the whole index.You can actually use wp-cron and turn off indexing on post creation: https://i.imgur.com/MlrbHkh.png
Ernest Marcinko
KeymasterHi!
When I saved the post and searched again, it appeared in the results list.
I suspect these posts are generated or imported from somewhere and not made via the post editor. A common issue with these is that the save_post hook is not executed after a post is generated.
Make sure that after the post is generated and all the data, tags etc.. are added, then this hook is also called for each post. This will tell WordPress to do the required maintenance on the post and execute the hooks attached to the save_post hook, such as updating the search index.Ernest Marcinko
KeymasterI will conduct a few more test on your site if you don’t mind. Don’t get scared if you see the wrong results again, it’s just me testing solutions – sorry about that 🙂
-
AuthorPosts