Skip to content

Commit

Permalink
[Azure Cognitive Search] Fix vectorSearchAlgorithmConfiguration polym…
Browse files Browse the repository at this point in the history
…orphism, 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
  • Loading branch information
Careyjmac authored May 31, 2023
1 parent d413808 commit 0cfd102
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"200": {
"body": {
"documentCount": 239572,
"storageSize": 72375920
"storageSize": 72375920,
"vectorIndexSize": 123456
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@
"skillsetCount": {
"usage": 0,
"quota": 3
},
"vectorIndexSize": {
"usage": 123456,
"quota": 26214400
}
},
"limits": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6143,6 +6143,7 @@
},
"VectorSearchAlgorithmConfiguration": {
"type": "object",
"discriminator": "kind",
"properties": {
"name": {
"externalDocs": {
Expand All @@ -6156,10 +6157,6 @@
"type": "string",
"description": "The name of the kind of algorithm being configured for use with vector search. Only `hnsw` is supported in the current preview.",
"x-nullable": false
},
"hnswParameters": {
"$ref": "#/definitions/HnswParameters",
"description": "Contains the parameters specific to hnsw algorithm."
}
},
"required": [
Expand All @@ -6168,6 +6165,23 @@
],
"description": "Contains configuration options specific to the algorithm used during indexing time."
},
"HnswVectorSearchAlgorithmConfiguration": {
"type": "object",
"x-ms-discriminator-value": "hnsw",
"allOf": [
{
"$ref": "#/definitions/VectorSearchAlgorithmConfiguration"
}
],
"properties": {
"hnswParameters": {
"x-ms-client-name": "Parameters",
"$ref": "#/definitions/HnswParameters",
"description": "Contains the parameters specific to hnsw algorithm."
}
},
"description": "Contains configuration options specific to the hnsw approximate nearest neighbors algorithm used during indexing time."
},
"HnswParameters": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -7398,7 +7412,7 @@
},
"vectorSearchConfiguration": {
"type": "string",
"x-nullable": false,
"x-nullable": true,
"description": "The name of the vector search algorithm configuration that specifies the algorithm and optional parameters for searching the vector field."
},
"synonymMaps": {
Expand Down Expand Up @@ -7981,6 +7995,12 @@
"x-nullable": false,
"readOnly": true,
"description": "The amount of storage in bytes consumed by the index."
},
"vectorIndexSize": {
"type": "integer",
"format": "int64",
"readOnly": true,
"description": "The amount of memory in bytes consumed by vectors in the index."
}
},
"required": [
Expand Down Expand Up @@ -11430,15 +11450,23 @@
"x-ms-client-name": "skillsetCounter",
"$ref": "#/definitions/ResourceCounter",
"description": "Total number of skillsets."
},
"vectorIndexSize": {
"x-ms-client-name": "vectorIndexSizeCounter",
"$ref": "#/definitions/ResourceCounter",
"description": "Total memory consumption of all vector indexes within the service, in bytes."
}
},
"required": [
"aliasesCount",
"documentCount",
"indexesCount",
"indexersCount",
"dataSourcesCount",
"storageSize",
"synonymMaps"
"synonymMaps",
"skillsetCount",
"vectorIndexSize"
],
"description": "Represents service-level resource counters and quotas."
},
Expand Down

0 comments on commit 0cfd102

Please sign in to comment.