diff --git a/specification/ai/Azure.AI.Projects/indexes/models.tsp b/specification/ai/Azure.AI.Projects/indexes/models.tsp index 4b43af09bb83..4bdce439118b 100644 --- a/specification/ai/Azure.AI.Projects/indexes/models.tsp +++ b/specification/ai/Azure.AI.Projects/indexes/models.tsp @@ -33,6 +33,10 @@ model AzureAISearchIndex extends Index { @doc("Name of index in Azure AI Search resource to attach") @visibility(Lifecycle.Create) indexName: string; + + @doc("Field mapping configuration") + @visibility(Lifecycle.Create) + fieldMapping?: FieldMapping; } @doc("Managed Azure AI Search Index Definition") @@ -67,6 +71,10 @@ model CosmosDBIndex extends Index { @doc("Embedding model configuration") @visibility(Lifecycle.Create) embeddingConfiguration: EmbeddingConfiguration; + + @doc("Field mapping configuration") + @visibility(Lifecycle.Create) + fieldMapping: FieldMapping; } @doc("Embedding configuration class") @@ -81,6 +89,34 @@ model EmbeddingConfiguration { embeddingField: string; } +@doc("Field mapping configuration class") +@added(Versions.v2025_05_01) +model FieldMapping { + @doc("List of fields with text content") + @visibility(Lifecycle.Create) + contentFields: string[]; + + @doc("Path of file to be used as a source of text content") + @visibility(Lifecycle.Create) + filepathField?: string; + + @doc("Field containing the title of the document") + @visibility(Lifecycle.Create) + titleField?: string; + + @doc("Field containing the url of the document") + @visibility(Lifecycle.Create) + urlField?: string; + + @doc("List of fields with vector content") + @visibility(Lifecycle.Create) + vectorFields?: string[]; + + @doc("List of fields with metadata content") + @visibility(Lifecycle.Create) + metadataFields?: string[]; +} + @added(Versions.v2025_05_01) union IndexType { string, diff --git a/specification/ai/data-plane/Azure.AI.Projects/preview/2025-05-15-preview/azure-ai-projects.json b/specification/ai/data-plane/Azure.AI.Projects/preview/2025-05-15-preview/azure-ai-projects.json index ad4f694be3aa..2f8ab9e2f0e7 100644 --- a/specification/ai/data-plane/Azure.AI.Projects/preview/2025-05-15-preview/azure-ai-projects.json +++ b/specification/ai/data-plane/Azure.AI.Projects/preview/2025-05-15-preview/azure-ai-projects.json @@ -1841,6 +1841,13 @@ "x-ms-mutability": [ "create" ] + }, + "fieldMapping": { + "$ref": "#/definitions/FieldMapping", + "description": "Field mapping configuration", + "x-ms-mutability": [ + "create" + ] } }, "required": [ @@ -2071,13 +2078,21 @@ "x-ms-mutability": [ "create" ] + }, + "fieldMapping": { + "$ref": "#/definitions/FieldMapping", + "description": "Field mapping configuration", + "x-ms-mutability": [ + "create" + ] } }, "required": [ "connectionName", "databaseName", "containerName", - "embeddingConfiguration" + "embeddingConfiguration", + "fieldMapping" ], "allOf": [ { @@ -2435,6 +2450,66 @@ "id" ] }, + "FieldMapping": { + "type": "object", + "description": "Field mapping configuration class", + "properties": { + "contentFields": { + "type": "array", + "description": "List of fields with text content", + "items": { + "type": "string" + }, + "x-ms-mutability": [ + "create" + ] + }, + "filepathField": { + "type": "string", + "description": "Path of file to be used as a source of text content", + "x-ms-mutability": [ + "create" + ] + }, + "titleField": { + "type": "string", + "description": "Field containing the title of the document", + "x-ms-mutability": [ + "create" + ] + }, + "urlField": { + "type": "string", + "description": "Field containing the url of the document", + "x-ms-mutability": [ + "create" + ] + }, + "vectorFields": { + "type": "array", + "description": "List of fields with vector content", + "items": { + "type": "string" + }, + "x-ms-mutability": [ + "create" + ] + }, + "metadataFields": { + "type": "array", + "description": "List of fields with metadata content", + "items": { + "type": "string" + }, + "x-ms-mutability": [ + "create" + ] + } + }, + "required": [ + "contentFields" + ] + }, "FileDatasetVersion": { "type": "object", "description": "FileDatasetVersion Definition", diff --git a/specification/ai/data-plane/Azure.AI.Projects/stable/2025-05-01/azure-ai-projects.json b/specification/ai/data-plane/Azure.AI.Projects/stable/2025-05-01/azure-ai-projects.json index 03992d5c5703..3c96d27cf2f3 100644 --- a/specification/ai/data-plane/Azure.AI.Projects/stable/2025-05-01/azure-ai-projects.json +++ b/specification/ai/data-plane/Azure.AI.Projects/stable/2025-05-01/azure-ai-projects.json @@ -1177,6 +1177,13 @@ "x-ms-mutability": [ "create" ] + }, + "fieldMapping": { + "$ref": "#/definitions/FieldMapping", + "description": "Field mapping configuration", + "x-ms-mutability": [ + "create" + ] } }, "required": [ @@ -1388,13 +1395,21 @@ "x-ms-mutability": [ "create" ] + }, + "fieldMapping": { + "$ref": "#/definitions/FieldMapping", + "description": "Field mapping configuration", + "x-ms-mutability": [ + "create" + ] } }, "required": [ "connectionName", "databaseName", "containerName", - "embeddingConfiguration" + "embeddingConfiguration", + "fieldMapping" ], "allOf": [ { @@ -1672,6 +1687,66 @@ ], "x-ms-discriminator-value": "AAD" }, + "FieldMapping": { + "type": "object", + "description": "Field mapping configuration class", + "properties": { + "contentFields": { + "type": "array", + "description": "List of fields with text content", + "items": { + "type": "string" + }, + "x-ms-mutability": [ + "create" + ] + }, + "filepathField": { + "type": "string", + "description": "Path of file to be used as a source of text content", + "x-ms-mutability": [ + "create" + ] + }, + "titleField": { + "type": "string", + "description": "Field containing the title of the document", + "x-ms-mutability": [ + "create" + ] + }, + "urlField": { + "type": "string", + "description": "Field containing the url of the document", + "x-ms-mutability": [ + "create" + ] + }, + "vectorFields": { + "type": "array", + "description": "List of fields with vector content", + "items": { + "type": "string" + }, + "x-ms-mutability": [ + "create" + ] + }, + "metadataFields": { + "type": "array", + "description": "List of fields with metadata content", + "items": { + "type": "string" + }, + "x-ms-mutability": [ + "create" + ] + } + }, + "required": [ + "contentFields" + ] + }, "FileDatasetVersion": { "type": "object", "description": "FileDatasetVersion Definition", diff --git a/specification/ai/data-plane/Azure.AI.Projects/stable/v1/azure-ai-projects.json b/specification/ai/data-plane/Azure.AI.Projects/stable/v1/azure-ai-projects.json index 1bff588ab00d..14d9cac190fa 100644 --- a/specification/ai/data-plane/Azure.AI.Projects/stable/v1/azure-ai-projects.json +++ b/specification/ai/data-plane/Azure.AI.Projects/stable/v1/azure-ai-projects.json @@ -1177,6 +1177,13 @@ "x-ms-mutability": [ "create" ] + }, + "fieldMapping": { + "$ref": "#/definitions/FieldMapping", + "description": "Field mapping configuration", + "x-ms-mutability": [ + "create" + ] } }, "required": [ @@ -1388,13 +1395,21 @@ "x-ms-mutability": [ "create" ] + }, + "fieldMapping": { + "$ref": "#/definitions/FieldMapping", + "description": "Field mapping configuration", + "x-ms-mutability": [ + "create" + ] } }, "required": [ "connectionName", "databaseName", "containerName", - "embeddingConfiguration" + "embeddingConfiguration", + "fieldMapping" ], "allOf": [ { @@ -1672,6 +1687,66 @@ ], "x-ms-discriminator-value": "AAD" }, + "FieldMapping": { + "type": "object", + "description": "Field mapping configuration class", + "properties": { + "contentFields": { + "type": "array", + "description": "List of fields with text content", + "items": { + "type": "string" + }, + "x-ms-mutability": [ + "create" + ] + }, + "filepathField": { + "type": "string", + "description": "Path of file to be used as a source of text content", + "x-ms-mutability": [ + "create" + ] + }, + "titleField": { + "type": "string", + "description": "Field containing the title of the document", + "x-ms-mutability": [ + "create" + ] + }, + "urlField": { + "type": "string", + "description": "Field containing the url of the document", + "x-ms-mutability": [ + "create" + ] + }, + "vectorFields": { + "type": "array", + "description": "List of fields with vector content", + "items": { + "type": "string" + }, + "x-ms-mutability": [ + "create" + ] + }, + "metadataFields": { + "type": "array", + "description": "List of fields with metadata content", + "items": { + "type": "string" + }, + "x-ms-mutability": [ + "create" + ] + } + }, + "required": [ + "contentFields" + ] + }, "FileDatasetVersion": { "type": "object", "description": "FileDatasetVersion Definition",