skip to Main Content

I am using azure cognitive search and the search is applied on content which is huge. It searches the result correctly but we don’t need the entire content. How can we get just 2-3 rows of the content with the matching string. Basically i don’t want the full content but just few characters(50-100) around the matching searched string.

Need to understand if this feature is available?

2

Answers


  1. The index will return what’s on your fields. You can limit using a simple .Substring method either on front-end or back-end.

    Login or Signup to reply.
  2. You can use the hit highlighting feature in Azure Search. Please see more information in the documentation here.

    Azure Search returns up to five text fragments, which are usually sentences, that contains the search hits per field. It currently does not allow you to configure the size of the window/fragment so you can’t get a specific number of words surrounding the search terms.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search