Support » Plugin: CloudSearch » Feature Request: better Content Highlighting

  • Hi!

    I noticed highlighting works great IF the search term is in the first few lines in content.

    Why not show the part of content with the highlighted search term instead? Like Google does 🙂

    Check out this screenshot:


    • This topic was modified 2 years, 7 months ago by Erik Molenaar.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Andrea Landonio


    Hi Erik,
    it’s a good idea but I think it could be very intensive for performance.. now with a regular expression I search for highlight text but only in the truncated string that is a “small” portion of text. Imagine that the content is very long, the reg-ex could be hard and time consuming.. this could give you back the search result items after seconds..
    I’m thinking if the is a quick solution..

    I am very curious what you’ll come up with 🙂

    If slow performance would be the result, it may be better to utulize the Excerpt field of posts/pages:


    …instead of showing the first lines of (main) Content in the search results. Which could be plagued with shortcodes and troublesome HTML code like:


    Again, I am curious about your take on this!

    Plugin Author Andrea Landonio


    Hi Erik! Your solution is the great one! If you content contains many markup, shortcodes, etc.. it could be a better way to use the excerpt and show it! In this way you provide a first “summary” with a thin and useful text (without bad tags), and clicking on it you can go to the article details and see the complete post content with HTML and SHORTCODES..
    For me is a very good solution! You maximize the control of what to see in the results..


Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Feature Request: better Content Highlighting’ is closed to new replies.