Aricie
Intégrateur de vos solutions d'avenir
DNN Community Forums

LuceneSearch Highlights: how do they work?

Sort:
You are not authorized to post a reply.
Author
Messages


samyb











New Member



Posts:




New Member



    I am not able to get the search highlighting to work. I have read the manual; but still no luck. Perhaps you could give me some sample/example input screens for the "Results highlights" and other input screens for me to try as a template.

    This question comes from the dotnetnuke support and is transferred here for follow-up purposes



    samyb











    New Member



    Posts:




    New Member



      To use highlights, you must

      • Set a highlight property in the results template, using the token replacement system
      • Configure the highlights correctly to match your desired output

      To set the results template you must use the Highlights property of the Result, as shown below. Simply adding [Result:Highlights] in the template will display the highlights when they are configured. The second part of the token allows you to format the token, you can use it to handle optionnal display.

      After setting the token in the results template, you can configure how the highlights will be displayed

      First you have to enable the highlights property. Then you can choose how much information will be displayed for each highlight; the number of fragments is the number of fields where the search settings matches information, and the number of words is the context in which the matching information is found. You can tweak these settings to get the most satisfying results in your search results page.

      Then you can customize the display of the highlights: each fragment will be displayed with the same token system we've discussed above; you can use this to format the representation of your highlights; here i decided to add a yellow background for the matching information to get a marker-like effect.

      After saving, my results now show up with the highlights really standing out in the results page

      You are not authorized to post a reply.