Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › How to i highlight the matched keyword?
- This topic has 9 replies, 2 voices, and was last updated 3 years, 9 months ago by
Ernest Marcinko.
-
AuthorPosts
-
August 31, 2022 at 4:23 am #39128
kennypurnomo
ParticipantHow to highlight the result keyword that matches the search keyword?
In my case is “BRIO”
August 31, 2022 at 12:53 pm #39139Ernest Marcinko
KeymasterHi,
You can do that via the keyword highlight feature.
August 31, 2022 at 4:11 pm #39143kennypurnomo
ParticipantIt is not highlighting “brio”. This is weird. Please see this video https://www.loom.com/share/035746d978374413a35a4b6cc10a6b24
Also how can i improve the loading speed?
August 31, 2022 at 4:54 pm #39145Ernest Marcinko
KeymasterIf the keyword is not within the visible context, it will not be highlighted. It is also possible, that the keyword was not matched at all, since you are using the “OR” keyword logic as I can see from the video.
Check this documentation to get the best possible search performance.
August 31, 2022 at 5:07 pm #39146kennypurnomo
ParticipantYes “Brio” might not be in the product title but definitely it is in the product description.
August 31, 2022 at 5:16 pm #39147Ernest Marcinko
KeymasterI understand. However if the keyword is further down the description (further than the short description length), then it simply does not fit into the view.
September 1, 2022 at 2:07 am #39151kennypurnomo
ParticipantNono, i definitely have “Brio” in the primary description as well.
Something is off with my setup.
Please advise
September 1, 2022 at 11:20 am #39156Ernest Marcinko
KeymasterI understand – but the description field has a maximum length set here. If the matching keywords are further away from each other, they may not fit into that.
Ex. “kampas” is in the first sentence, and the “brio” is 20 lines lower, it will not fit into the default 130 characters. Try increasing that length, but that of course will lead to more lengthy result descriptions.September 2, 2022 at 7:06 am #39177kennypurnomo
ParticipantAs you can see in the attachment, i have “Primary Description Field for Posts/Pages/CPT” filled with “car_type” where car type is something like “Brio CBU DD2 1.3, Brio Satya DD1, Brio Satya New DD1, City GD8 IDSI, City GD8 VTEC, Civic Estilo SR3, Civic Genio SR4, Jazz GD3 IDSI, Jazz GD3 VTEC”
1. How can this (“Brio”) not be found?
2. How the plugin determines which to show between PRIMARY and SECONDARY description?September 2, 2022 at 11:45 am #39183Ernest Marcinko
KeymasterIt does not mean it was not found. It only means, that the word is not on the screen for the highlighter to highlight it. If you increase the description lenght, then more of the results description text will be visible. If the word “brio” is within this text, then the plugin will highlight it.
By default the Primary field is displayed, if the primary field is empty, then it will use the secondary field.
-
AuthorPosts
- You must be logged in to reply to this topic.