Skip to content
Advertisement

How to use select on azure search suggesters

I’m using Azure search on my project, and I want to do an autocomplete text field, it works as expected. here’s the code :

JavaScript

her’s the result :

JavaScript

here’s the quesry passed by postman :

JavaScript

but the problem is , on the result I have just the text and the id of the document , I’m looking for other fields like status for example, how can get that please ?

Advertisement

Answer

I am guessing “Status” is one of your index fields, from the question. You need to make sure you mark the fields you need to be returned in the results as retrievable in your index definition. It looks you only have text and id fields as retrievable. For more information: https://learn.microsoft.com/en-us/azure/search/search-what-is-an-index.

Example:

enter image description here

Advertisement