Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions specification/ai/Azure.AI.Projects/indexes/models.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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")
Expand All @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1841,6 +1841,13 @@
"x-ms-mutability": [
"create"
]
},
"fieldMapping": {
"$ref": "#/definitions/FieldMapping",
"description": "Field mapping configuration",
"x-ms-mutability": [
"create"
]
}
},
"required": [
Expand Down Expand Up @@ -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": [
{
Expand Down Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1177,6 +1177,13 @@
"x-ms-mutability": [
"create"
]
},
"fieldMapping": {
"$ref": "#/definitions/FieldMapping",
"description": "Field mapping configuration",
"x-ms-mutability": [
"create"
]
}
},
"required": [
Expand Down Expand Up @@ -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": [
{
Expand Down Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1177,6 +1177,13 @@
"x-ms-mutability": [
"create"
]
},
"fieldMapping": {
"$ref": "#/definitions/FieldMapping",
"description": "Field mapping configuration",
"x-ms-mutability": [
"create"
]
}
},
"required": [
Expand Down Expand Up @@ -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": [
{
Expand Down Expand Up @@ -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",
Expand Down
Loading