Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › show the post content that has the highlighted word match only
This topic contains 14 replies, has 2 voices, and was last updated by Ernest Marcinko 1 year, 3 months ago.
- AuthorPosts
- December 29, 2022 at 8:18 am #40658
Hi, the post content that has hilighted word match shows up in the search result is ok, make sense to me. However some post contents show up in the result with no any word highlighted match at all. It shouldn’t show up if no any hilighted word match, shouldn’t it. I’ve tried this one by one but the it still shows the post content that has no any highlighted word match in the result. https://documentation.ajaxsearchpro.com/behavior/search-logic/search-logics-explained
How can I show the post content that has the highlighted word match only.
December 29, 2022 at 1:13 pm #40659Hi,
The highlighter is only applied after the search process is completed. It is more likely that the content is either filtered or changed a tiny bit by WordPress hooks and the highligthed keyword is no longer present in the content field.
Depending on the configuration it is also possible that the match is coming from the title or from a different selected custom field, which may not be part of the content, which is then not highlighted.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
December 29, 2022 at 1:40 pm #40660I have tried a keyword that doesn’t match the title or any custom field, but still it show up. That means my keyword is not related to the title and custom field at all. And I even disable filter but not working.
I have basic configuration that comes with the options of the plugin but don;t know why this happen. Can you check my configuration?
- This reply was modified 1 year, 3 months ago by kokosan.
December 29, 2022 at 1:41 pm #40661You can try this keyword “ถ่ม”
December 29, 2022 at 2:02 pm #40663I try longer word, no prolem. It seems that this happen in short word. Maybe this is related to language character?
December 29, 2022 at 2:04 pm #40664December 31, 2022 at 12:59 pm #40672Hi,
Check if the highlighter is set to match partials as well: https://i.imgur.com/OC3rbDk.png
Best,
It may not work for all the languages though – especially the ones with multibyte characters, javascript can’t deal with all the character boundaries.
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
December 31, 2022 at 5:14 pm #40673Disabling that option doesn’t show any highlight.
I’ve tried again. The keyword I told you has 3 characters. I also tried other words that have 3 characters and even 2 characters but no problem. The highlights show up correctly, no results without highlight. As I know for now It happens only the keyword I told you, it shows the result without highlight, strange. When it shows the result, there should be highlights on it. For example, it show 10 post results. The 6 results have highlights but the 4 results have no highlights but just show results and no keyword exists on the results.
January 1, 2023 at 4:06 am #40680About this “Disabling that option doesn’t show any highlight.” Enable not disable, my mistake. Enabling this option doesn’t show any highlight, so I set to disable by default.
January 1, 2023 at 5:07 pm #40682FYI: I’ve tried again. It doesn’t happen only with that keyword, happen with other keyword as well. That mean it happen with some and not with some.
January 3, 2023 at 1:20 pm #40689Okay, thank you for the feedback. I believe the issue is not the highlighter, but the search query matches non-accented characters as well.
Can you please try the following settings: https://i.imgur.com/ePsiscg.png
Best,
This will force exact case and unicode character matches only. It should reduce the number of results to only exactly matching the characters with accents.
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
January 3, 2023 at 2:25 pm #40696This is what I want, thank you!
January 3, 2023 at 2:30 pm #40697You cannot access this content. Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
January 3, 2023 at 3:01 pm #40698Sure! I’ve rated it. Check it out.
January 3, 2023 at 3:23 pm #40699You cannot access this content. Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
- AuthorPosts
The topic ‘show the post content that has the highlighted word match only’ is closed to new replies.