Hi Rikin,
The "Import and Vectorize Data" option auto-generates fields optimized for AI search and doesn't allow customization. Manually defining the schema before indexing gives you full control over facetable, sortable, and filterable attributes.
To achieve it we should manually create the index and then link it to a data source.
Navigate to Azure AI Search → Indexes → "Create Index" and define your index schema manually. When configuring the fields, ensure that you set the necessary attributes: facetable
as true
for filtering and grouping, sortable
as true
for ordering results, filterable
as true
for using in $filter
queries, and retrievable
as true
if you want the field to appear in search results. Additionally, for vector search, define a field of type Collection(Edm.Single)
and attach a vectorSearchConfiguration
.
Once the index is created, you need to manually attach a data source (such as Azure Blob Storage, Cosmos DB, or SQL Database) and configure an indexer to populate the index. Unlike the automated process in "Import and Vectorize Data," this approach allows you to fine-tune the schema while still benefiting from semantic+vector search.
{
"name": "my-search-index",
"fields": [
{
"name": "id",
"type": "Edm.String",
"key": true,
"retrievable": true
},
{
"name": "title",
"type": "Edm.String",
"retrievable": true,
"sortable": true,
"facetable": true
},
{
"name": "category",
"type": "Edm.String",
"filterable": true,
"facetable": true
},
{
"name": "contentVector",
"type": "Collection(Edm.Single)",
"searchable": true,
"vectorSearchConfiguration": "default"
}
],
"vectorSearch": {
"algorithms": [
{
"name": "default",
"kind": "hnsw",
"parameters": {
"m": 4,
"efConstruction": 400
}
}
]
}
}
If you have any further assistant, do let me know.