Unable to call post api for semantic search

Jadhav, Tejswi 21 Reputation points
2022-03-29T09:43:23.417+00:00

Hello Team,

I tried to call post API for Azure cognitive search but got below error.
API : https://nae2uasrch0002.search.windows.net/indexes/na-claims-uat-100-characters/docs/search?api-version=2020-06-30-preview

ERROR : {

"error": {

    "code": "",

    "message": "The request is invalid. Details: parameters : The parameter 'semanticConfiguration' in the request payload is not a valid parameter for the operation 'search'.\r\n"

}

}

PAYLOAD:
{
"search": "towing",

"queryType": "semantic",

"queryLanguage": "en-us",

"semanticConfiguration": "test_config"

}

But while I tried with "GET" method I can successfully call that API.

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.
1,061 questions
0 comments No comments
{count} votes

Accepted answer
  1. SnehaAgrawal-MSFT 21,691 Reputation points
    2022-03-29T11:21:44.11+00:00

    Thanks for asking question! If I am understanding right you are using 2020-06-30-Preview.

    Could you please try upgrading to 2021-04-30-Preview and then using semanticConfiguration or use searchFields instead of semanticConfiguration.

    As its mentioned in here:

    187888-azure-cognitive-search-microsoft-docs.png

    More details: https://learn.microsoft.com/en-us/azure/search/semantic-how-to-query-request?tabs=semanticConfiguration%2Cportal

    Let us know if issue remains or further query on this.


0 additional answers

Sort by: Most helpful

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.