Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Not seeing keyword in search results
- This topic has 10 replies, 2 voices, and was last updated 4 years ago by
Ernest Marcinko.
-
AuthorPosts
-
May 6, 2022 at 12:38 am #37726
andreychek
ParticipantHi!
The brief explanation — when doing a live search, certain pages produce search results that are always just the first few words of the page, and not the actual context of the search query.
The issue occurs with a different/generic theme.
The issue occurs with all other plugins disabled.
I don’t believe any messages in the logs are related.
Some additional detail —
First, thanks for any assistance you can provide!
We’re putting some documentation on our website that is a series of lengthy pages.
What we want to do, is allow a user to perform a search, and have the context of their search results show up below the search box. They’d then be able to click it if that part of the documentation was what they wanted. And after clicking, we’d like it to jump down to that section of the documentation.
What we’re seeing is that while there are some pages that do show the context of the search, some do not… those that do not just show a few sentences from the beginning of the document, not the content they searched for (though that content does exist further down in the document).
I’ve attached a screenshot so you can see what I mean.
We have 4 versions of a similar document, all containing very similar text. I searched for the word “asbestos”, which exists in all the documents. The first result does not show that word though, only the beginning of the document. The other documents do show the word asbestos and the surrounding context.
Any thoughts on what might be different about that first document, that’s preventing it from showing any context?
Thanks for any thoughts!
-EricMay 6, 2022 at 12:35 pm #37730Ernest Marcinko
KeymasterHi,
The algorithm getting the keyword context is limited to a 10000 character text length for performance reasons. I strongly suspect that might be the cause of the issue here. You can try to increase that here: https://i.imgur.com/rEV9ZFC.png
May 6, 2022 at 2:29 pm #37731andreychek
ParticipantThanks for your response!
I unfortunately still seem to be seeing the same issue though.
I changed that option to 99000 first, and then even 999000.
I attached a new screenshot of how the option looks now, as well as the results.
Thanks for any thoughts!
May 9, 2022 at 9:11 am #37738Ernest Marcinko
KeymasterHm, interesting. The 999 000 character limit should be around 600 pages of content – I highly doubt, that any of your single page content exceeds that.
Okay, my second guess is, that if there are any shortcodes used within the content, they may not be executed, leaving some parts out. Can you please try changing this option: https://i.imgur.com/i60At3R.png
May 10, 2022 at 6:36 am #37753andreychek
ParticipantThank you very much for your response!
That idea makes all the sense in the world.
I changed that option, though I unfortunately still seem to be seeing the same results.
Any other thoughts on what I could try?
Thanks again!
May 11, 2022 at 2:17 pm #37767Ernest Marcinko
KeymasterHm, I don’t know then I’m afraid.
Can you add temporary FTP and back-end access? I will try to debug the code directly, to see what happens with that specific result.
May 13, 2022 at 3:11 pm #37782andreychek
ParticipantThanks for your response!
I had a suspicion you may eventually ask for that 🙂 It’s a very reasonable request — I’m working out a few details with the owner of the site, and I hope to have that available shortly.
May 18, 2022 at 10:03 pm #37797andreychek
ParticipantYou cannot access this content.
May 20, 2022 at 12:09 pm #37808Ernest Marcinko
KeymasterYou cannot access this content.
May 20, 2022 at 3:11 pm #37810andreychek
ParticipantYou cannot access this content.
May 23, 2022 at 2:12 pm #37835Ernest Marcinko
KeymasterThank you!
Luckily it was not a bug after all. The post missing the description had a post_excerpt field defined, so by default the plugin used that – and not the actual post content – as it is the primary content field. I have changed that here, now it finally looks okay.
-
AuthorPosts
- You must be logged in to reply to this topic.