Does anyone have an example of getting the Answer from the semantic search in Azure Cognitive Search using c#.
This is what I have but I can seem to get the AnswerResult from it.
SearchOptions options;
SearchResults<Hotel> response;
options = new SearchOptions()
{
QueryType = Azure.Search.Documents.Models.SearchQueryType.Semantic,
QueryLanguage = QueryLanguage.EnUs,
SemanticConfigurationName = "my-semantic-config",
QueryCaption = QueryCaptionType.Extractive,
QueryCaptionHighlightEnabled = true
};
options.Select.Add("HotelName");
options.Select.Add("Category");
options.Select.Add("Description");
// response = srchclient.Search<Hotel>("*", options);
response = srchclient.Search<Hotel>("Who is the manager of Triple Landscape Hotel?", options);
I have tried and can see the answer in rest but I am a bit of of newbie to using it C#