You are creating a .NET Core MVC application that uses Azure Cognitive Search to find holiday accommodations by multiple criteria, including a price range and proximity to an airport. Which property of the SearchParameters class should you set to restrict results by price and distance?
Choose an answer
Tap an option to check your answer.
Correct answer: Set the Filter property of the SearchParameters class..
Why this is the answer
The Filter property of the SearchParameters class is used to apply OData filter expressions to narrow down search results based on specific criteria, such as a price range (e.g., price ge 100 and price le 500) or proximity to a location (e.g., geo.distance(location, geography'POINT(-122.131577 47.678581)') le 5). SearchMode defines how search terms are interpreted (e.g., "any" or "all"), but doesn't filter results by specific values. QueryType specifies the query language (e.g., simple or full Lucene), which affects how search strings are parsed, not how results are filtered by properties. Facets are used to categorize search results and provide counts for different values, typically for UI filtering, but they don't restrict the initial search results themselves.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed