Skip to Content

AI-102: Which Azure AI Search Index Attribute Should Be Disabled for Hidden Product Ratings?

Learn why the ‘Searchable’ attribute should not be enabled for hidden product ratings in Azure AI Search. Optimize your index setup for better performance and user experience.

Table of Contents

Question

Xerigon Corporation has created an AI Search service in their Azure subscription. The service will connect to an Azure SQL database. You plan to create an index for the AI Search service by using the Azure portal.

The Azure SQL database contains a table named Products. Each row in the table has a field named UserRating that includes a numerical value between 1 and 100.

You have the following requirements:

  • Users need to search for products by rating.
  • The end user should not see the rating.
  • User should be able to drill down to see multiple products with the same rating.

Which index attribute should you NOT enable for the products field?

A. Sortable
B. Filterable
C. Searchable
D. Facetable
E. Retrievable

Answer

C. Searchable

Explanation

Since the ratings field is numeric, it cannot have the searchable attribute enabled in an index.

Since the ratings field is numeric, it cannot have the searchable attribute enabled in an index.

You can create an index in the Azure portal by choosing your Azure AI Search service and importing data from your data source. The import data wizard allows you to create an index. The graphic is a sample index created from a data source.

An index must have a name and contain field(s). One field is considered the key which uniquely identifies each document. A field must have a name, data type, and associate attributes. Attributes specify how the field is used in the search index. You can enable the following attributes on a field:

  • Retrievable: Enable this attribute when you want the field returned in the query response. The attribute helps when you want to use a field (for example gross profit) as a scoring mechanism, filter, or for sorting. It has no effect on the size of the index.
  • Filterable: Enable this attribute if the field accepts a filter expression. However, filterable fields are strings, such as dm.String or Collection(Edm.String) and cannot be word-broken. If field M is set to “electric razor”, $filter=M eq ‘electric’ finds no matches, but $filter=M eq ‘electric razor’ will.
  • Sortable: Enable this attribute for fields that accept an orderby expression, which can sort results by score. However, you cannot set this attribute on fields of type Collection(Edm.String).
  • Facetable: Enable this attribute for fields for drilldown filtering. This attribute is used for search results that include the number count by category. For example, you want to know how many Waffle House restaurants are in a particular city. However, this attribute cannot be used with fields of type Edm.GeographyPoint.
  • Searchable: Enable this attribute for fields for full text search. The field must be a string, not numeric or boolean. The string field can be word broken. If you set a value such as “electric razor”, internally it is split into the individual tokens “electric” and “razor”.

Microsoft Azure AI Engineer Associate AI-102 certification exam practice question and answer (Q&A) dump with detail explanation and reference available free, helpful to pass the Microsoft Azure AI Engineer Associate AI-102 exam and earn Microsoft Azure AI Engineer Associate AI-102 certification.