Skip to content

Commit 0cfd102

Browse files
authored
[Azure Cognitive Search] Fix vectorSearchAlgorithmConfiguration polymorphism, add vectorIndexSize to statistics (#24112)
* Fix vectorSearchAlgorithmConfiguration polymorphism * Fix lintdiff * Fix vectorSearchConfiguration x-nullable to be true * Add vectorIndexSize to index and service statistics * Respond to feedback, fix build issues
1 parent d413808 commit 0cfd102

File tree

3 files changed

+40
-7
lines changed

3 files changed

+40
-7
lines changed

specification/search/data-plane/Azure.Search/preview/2023-07-01-Preview/examples/SearchServiceGetIndexStatistics.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
"200": {
99
"body": {
1010
"documentCount": 239572,
11-
"storageSize": 72375920
11+
"storageSize": 72375920,
12+
"vectorIndexSize": 123456
1213
}
1314
}
1415
}

specification/search/data-plane/Azure.Search/preview/2023-07-01-Preview/examples/SearchServiceGetServiceStatistics.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@
3838
"skillsetCount": {
3939
"usage": 0,
4040
"quota": 3
41+
},
42+
"vectorIndexSize": {
43+
"usage": 123456,
44+
"quota": 26214400
4145
}
4246
},
4347
"limits": {

specification/search/data-plane/Azure.Search/preview/2023-07-01-Preview/searchservice.json

Lines changed: 34 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6143,6 +6143,7 @@
61436143
},
61446144
"VectorSearchAlgorithmConfiguration": {
61456145
"type": "object",
6146+
"discriminator": "kind",
61466147
"properties": {
61476148
"name": {
61486149
"externalDocs": {
@@ -6156,10 +6157,6 @@
61566157
"type": "string",
61576158
"description": "The name of the kind of algorithm being configured for use with vector search. Only `hnsw` is supported in the current preview.",
61586159
"x-nullable": false
6159-
},
6160-
"hnswParameters": {
6161-
"$ref": "#/definitions/HnswParameters",
6162-
"description": "Contains the parameters specific to hnsw algorithm."
61636160
}
61646161
},
61656162
"required": [
@@ -6168,6 +6165,23 @@
61686165
],
61696166
"description": "Contains configuration options specific to the algorithm used during indexing time."
61706167
},
6168+
"HnswVectorSearchAlgorithmConfiguration": {
6169+
"type": "object",
6170+
"x-ms-discriminator-value": "hnsw",
6171+
"allOf": [
6172+
{
6173+
"$ref": "#/definitions/VectorSearchAlgorithmConfiguration"
6174+
}
6175+
],
6176+
"properties": {
6177+
"hnswParameters": {
6178+
"x-ms-client-name": "Parameters",
6179+
"$ref": "#/definitions/HnswParameters",
6180+
"description": "Contains the parameters specific to hnsw algorithm."
6181+
}
6182+
},
6183+
"description": "Contains configuration options specific to the hnsw approximate nearest neighbors algorithm used during indexing time."
6184+
},
61716185
"HnswParameters": {
61726186
"type": "object",
61736187
"properties": {
@@ -7398,7 +7412,7 @@
73987412
},
73997413
"vectorSearchConfiguration": {
74007414
"type": "string",
7401-
"x-nullable": false,
7415+
"x-nullable": true,
74027416
"description": "The name of the vector search algorithm configuration that specifies the algorithm and optional parameters for searching the vector field."
74037417
},
74047418
"synonymMaps": {
@@ -7981,6 +7995,12 @@
79817995
"x-nullable": false,
79827996
"readOnly": true,
79837997
"description": "The amount of storage in bytes consumed by the index."
7998+
},
7999+
"vectorIndexSize": {
8000+
"type": "integer",
8001+
"format": "int64",
8002+
"readOnly": true,
8003+
"description": "The amount of memory in bytes consumed by vectors in the index."
79848004
}
79858005
},
79868006
"required": [
@@ -11430,15 +11450,23 @@
1143011450
"x-ms-client-name": "skillsetCounter",
1143111451
"$ref": "#/definitions/ResourceCounter",
1143211452
"description": "Total number of skillsets."
11453+
},
11454+
"vectorIndexSize": {
11455+
"x-ms-client-name": "vectorIndexSizeCounter",
11456+
"$ref": "#/definitions/ResourceCounter",
11457+
"description": "Total memory consumption of all vector indexes within the service, in bytes."
1143311458
}
1143411459
},
1143511460
"required": [
11461+
"aliasesCount",
1143611462
"documentCount",
1143711463
"indexesCount",
1143811464
"indexersCount",
1143911465
"dataSourcesCount",
1144011466
"storageSize",
11441-
"synonymMaps"
11467+
"synonymMaps",
11468+
"skillsetCount",
11469+
"vectorIndexSize"
1144211470
],
1144311471
"description": "Represents service-level resource counters and quotas."
1144411472
},

0 commit comments

Comments
 (0)