I am creating a search for a website and using many filter options. I want to use filter on my many search results and for that i saw Filter property in SearchParameters for Azure Cognitive search. What i want is to pass a variable in Filter when i try to pass those parameters in filter search. Is there any possible way that i do not have to manually pass the Boulevard House from my data and use the variable houseName instead as i have provided options to choose and this is just plain-hardcode. Any refernce will help as well, as i tried to read the documents but in vain.
{
Filter = String.Format("HouseName eq '{0}'", houseName)
} ;
var names = new List<Search>();
if (nameResult.Results.Count > 0)
{
foreach (SearchResult<Search> results in nameResult.Results)
{
names.Add(results.Document);
}
}
NameSearchViewModel nameSearchViewModel = new NameSearchViewModel();
nameSearchViewModel.Grants = names;
return View(namesSearchViewModel);