Search code examples
azureazure-cognitive-search

Azure Search highlights not returned for every result


I recently encounter an issue with the azure search, where the highlights are not populated on every result item.

View the results returned by Azure Search Explorer

The same thing happens on both '2015-02-28' and '2015-02-28-Preview' search API versions.

Thanks.


Solution

  • The issue was in broad wildcard search query. For performance, Azure Search internally uses a filter when a wildcard search query expands to too many (a few hundreds) terms, or matches more than a certain percentage of the document set. In such cases, not all the result items contain the highlight hits. The customer was hitting the known case. To workaround the issue, we recommend trying a query with higher selectivity. I apologize for the inconvenience.

    Please let me know if you have any further questions.

    Nate