Search code examples
azureazure-cognitive-search

About Cognitive Search search result matches


When I query Cognitive Search, I receive a list of fields as a result. Is there a way to determine which field the query matched?

I've created several custom fields and stored texts in each of them. I want to perform a query search on these fields and extract the content from the matched field. Therefore, please let me know how to identify the name of the field that matched the query.


Solution

  • You can try using the "featuresMode":"enabled" flag in your search query. This is an experimental feature only available in preview APIs (2020-06-30-preview and above)

    https://learn.microsoft.com/en-us/rest/api/searchservice/preview-api/search-documents