Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › show the post content that has the highlighted word match only
- This topic has 14 replies, 2 voices, and was last updated 3 years, 5 months ago by
Ernest Marcinko.
-
AuthorPosts
-
December 29, 2022 at 8:18 am #40658
kokosan
ParticipantHi, 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 #40659Ernest Marcinko
KeymasterHi,
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.
December 29, 2022 at 1:40 pm #40660kokosan
ParticipantI 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 3 years, 5 months ago by
kokosan.
December 29, 2022 at 1:41 pm #40661kokosan
ParticipantYou can try this keyword “ถ่ม”
December 29, 2022 at 2:02 pm #40663kokosan
ParticipantI 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 #40664kokosan
ParticipantDecember 31, 2022 at 12:59 pm #40672Ernest Marcinko
KeymasterHi,
Check if the highlighter is set to match partials as well: https://i.imgur.com/OC3rbDk.png
It may not work for all the languages though – especially the ones with multibyte characters, javascript can’t deal with all the character boundaries.December 31, 2022 at 5:14 pm #40673kokosan
ParticipantDisabling 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 #40680kokosan
ParticipantAbout 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 #40682kokosan
ParticipantFYI: 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 #40689Ernest Marcinko
KeymasterOkay, 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
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.January 3, 2023 at 2:25 pm #40696kokosan
ParticipantThis is what I want, thank you!
January 3, 2023 at 2:30 pm #40697Ernest Marcinko
KeymasterYou cannot access this content.
January 3, 2023 at 3:01 pm #40698kokosan
ParticipantSure! I’ve rated it. Check it out.
January 3, 2023 at 3:23 pm #40699Ernest Marcinko
KeymasterYou cannot access this content.
-
This reply was modified 3 years, 5 months ago by
-
AuthorPosts
- The topic ‘show the post content that has the highlighted word match only’ is closed to new replies.