@Seach.Facet values not returned in REST API

Viswavaageesh Chandramouli 20 Reputation points
2024-09-17T10:45:33.96+00:00

Hi All,

There's a difference between the results returned in the Azure Search Portal and the Rest API.
The parameter @search.facets and its associated values are not returned using the Rest API.

In the Azure Portal using a JSON query, the parameter @search.facets is retured:

User's image

But, in visual studio code, use the REST API Request:


GET {{baseUrl}}/indexes/{{indexName}}/docs?api-version=2024-05-01-preview&search=Renewables&$filter=TimePeriod eq '2035' and EnergyVector eq 'Renewables'&$select=*&$facet=Location,count:1000
Content-Type: application/json
api-key: {{apiKey}}

The parameter is not returned.
User's image

Thanks in advance.

Azure AI Search
Azure AI Search
An Azure search service with built-in artificial intelligence capabilities that enrich information to help identify and explore relevant content at scale.
958 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.