i am using Azure search sdk 3.0.1 with syntax similar to below, where T is the POCO object , and i want List returned
await indexClient.Documents.SuggestAsync<T>(input.Term, suggesterName,
indexType.GetAutoCompleteSearchParameters())
this gives me back DocumentSuggestResults, i did not see any examples or methods in azure sdk that will directly give me Ienumerable or convert this DocumentSuggestResults to Ienumerable . Is there a easy way to do this? or i need unpack this object myself loop and create a Ienumerable myself?
DocumentSuggestResults
does not implementIEnumerable
, but you can always just access theResults
property and use LINQ to get at the documents: