AI-102 exam dumps

AI-102 practice question 360 of 493

Designing and Implementing a Microsoft Azure AI Solution. Professional level, Microsoft. Free question with the correct answer and a full explanation.

AI-102 Question 360

Select 3

You are designing a search solution for a retail website that uses Azure Cognitive Search. You need to create an index for storing product data, which includes fields for ProductID (string), Name (string), Description (string), Price (double), and Availability (boolean). The solution must support filtering for products based on availability and sorting by price. Which steps are required to define the index schema in Azure Cognitive Search to meet these requirements?

  1. A

    Set the 'ProductID' field as the key field.

  2. B

    Mark the 'Availability' field as filterable.

  3. C

    Define the 'Price' field as sortable.

  4. D

    Set the 'Description' field as the key field.

  5. E

    Mark the 'Name' field as retrievable only.

Show answer and explanation

Correct answers: A, B, C

Explanation

To meet the requirements of the scenario, you must define an index schema that includes a key field ('ProductID') for uniquely identifying documents, mark the 'Availability' field as filterable to allow filtering by availability, and define the 'Price' field as sortable to enable sorting by price. These features ensure the index meets the functional requirements for filtering and sorting in the retail website's search solution.

  • A. Correct.

    Setting the 'ProductID' field as the key field is mandatory because every index in Azure Cognitive Search requires a key field, which uniquely identifies each document.

  • B. Correct.

    Marking the 'Availability' field as filterable allows you to filter search results based on whether a product is available or not, which is a requirement of the scenario.

  • C. Correct.

    Defining the 'Price' field as sortable ensures that search results can be ordered by price, as per the scenario's requirements.

  • D. Incorrect.

    The key field must be a field that uniquely identifies each document, and 'Description' is not suitable for this purpose.

  • E. Incorrect.

    Marking the 'Name' field as retrievable only is not necessary for this scenario, as the question does not mention restricting fields to retrievable-only access.

Timed practice exam

Take a AI-102 practice test under exam conditions

40 questions in 120 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam