html and highlights RRS feed

  • Question

  • my content contains html.   when highlights are returned I find they maybe split in the middle of a html tag e.g.  <b>aasdasdad  my search term asdasdasdasd....." but not ending </b> tag resulting in the remainder of the document rendering in bold.

    not sure if I should be using highlights snippet text in my html or using it substring on the original content or doing some magic to close tags.  if that's the case would be nice if azure search id it automatically.

    Any tips to avoid broken html from highlight snippet text welcome.

    anyone had any good experience scaling horizontally with Azure search in SaaS setup.  1 user 1 index. 

    Monday, October 16, 2017 3:24 PM

All replies

  • It is possible that the </b> highlight post tag is embedded within another html object in your search result's text.

    We are investigating this behavior, but in the meantime a workaround would be to strip your content of HTML tags using the html_strip char filter in a Custom Analyzer to prevent highlighting tags from being misinterpreted. You can read more here: https://docs.microsoft.com/en-us/rest/api/searchservice/custom-analyzers-in-azure-search

    Please reach out to me if you have more questions: ashmaka[at]Microsoft[dot]com

    Tuesday, October 17, 2017 6:58 PM