Skip to content

Commit

Permalink
[Azure Search] Add Knowledge Store feature to swagger (#13911)
Browse files Browse the repository at this point in the history
* introduce knowledge store swagger

* add knowledge store to 2020 apis

Co-authored-by: Austin Drefke <jdrefke@microsoft.com>
  • Loading branch information
jadrefke and Austin Drefke authored Apr 16, 2021
1 parent 8455572 commit af7a216
Show file tree
Hide file tree
Showing 6 changed files with 547 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,53 @@
],
"httpHeaders": {}
}
]
],
"knowledgeStore": {
"storageConnectionString": "DefaultEndpointsProtocol=https;AccountName=myStorage;AccountKey=myStorageKey;EndpointSuffix=core.windows.net",
"projections": [
{
"tables": [
{
"tableName": "Reviews",
"generatedKeyName": "ReviewId",
"source": "/document/Review",
"sourceContext": null,
"inputs": []
},
{
"tableName": "Sentences",
"generatedKeyName": "SentenceId",
"source": "/document/Review/Sentences/*",
"sourceContext": null,
"inputs": []
},
{
"tableName": "KeyPhrases",
"generatedKeyName": "KeyPhraseId",
"source": "/document/Review/Sentences/*/KeyPhrases",
"sourceContext": null,
"inputs": []
},
{
"tableName": "Entities",
"generatedKeyName": "EntityId",
"source": "/document/Review/Sentences/*/Entities/*",
"sourceContext": null,
"inputs": []
}
]
},
{
"objects": [
{
"storageContainer": "Reviews",
"source": "/document/Review",
"generatedKeyName": "/document/Review/Id"
}
]
}
]
}
}
},
"responses": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6822,6 +6822,10 @@
"$ref": "#/definitions/CognitiveServicesAccount",
"description": "Details about cognitive services to be used when running skills."
},
"knowledgeStore": {
"$ref": "#/definitions/SearchIndexerKnowledgeStore",
"description": "Definition of additional projections to azure blob, table, or files, of enriched data."
},
"@odata.etag": {
"x-ms-client-name": "ETag",
"type": "string",
Expand Down Expand Up @@ -6881,6 +6885,138 @@
"key"
]
},
"SearchIndexerKnowledgeStore": {
"properties": {
"storageConnectionString": {
"type": "string",
"description": "The connection string to the storage account projections will be stored in."
},
"projections": {
"type": "array",
"items": {
"$ref": "#/definitions/SearchIndexerKnowledgeStoreProjection",
"x-nullable": false
},
"description": "A list of additional projections to perform during indexing."
}
},
"required": [
"storageConnectionString",
"projections"
],
"externalDocs": {
"url": "https://docs.microsoft.com/azure/search/knowledge-store-projection-overview"
},
"description": "Definition of additional projections to azure blob, table, or files, of enriched data."
},
"SearchIndexerKnowledgeStoreProjection": {
"properties": {
"tables": {
"type": "array",
"items": {
"$ref": "#/definitions/SearchIndexerKnowledgeStoreTableProjectionSelector",
"x-nullable": false
},
"description": "Projections to Azure Table storage."
},
"objects": {
"type": "array",
"items": {
"$ref": "#/definitions/SearchIndexerKnowledgeStoreObjectProjectionSelector",
"x-nullable": false
},
"description": "Projections to Azure Blob storage."
},
"files": {
"type": "array",
"items": {
"$ref": "#/definitions/SearchIndexerKnowledgeStoreFileProjectionSelector",
"x-nullable": false
},
"description": "Projections to Azure File storage."
}
},
"description": "Container object for various projection selectors."
},
"SearchIndexerKnowledgeStoreProjectionSelector": {
"properties": {
"referenceKeyName": {
"type": "string",
"description": "Name of reference key to different projection."
},
"generatedKeyName": {
"type": "string",
"description": "Name of generated key to store projection under."
},
"source": {
"type": "string",
"description": "Source data to project."
},
"sourceContext": {
"type": "string",
"description": "Source context for complex projections."
},
"inputs": {
"type": "array",
"items": {
"$ref": "#/definitions/InputFieldMappingEntry"
},
"description": "Nested inputs for complex projections."
}
},
"description": "Abstract class to share properties between concrete selectors."
},
"SearchIndexerKnowledgeStoreBlobProjectionSelector": {
"properties": {
"storageContainer": {
"type": "string",
"description": "Blob container to store projections in."
}
},
"allOf": [
{
"$ref": "#/definitions/SearchIndexerKnowledgeStoreProjectionSelector"
}
],
"required": [
"storageContainer"
],
"description": "Abstract class to share properties between concrete selectors."
},
"SearchIndexerKnowledgeStoreTableProjectionSelector": {
"properties": {
"tableName": {
"type": "string",
"description": "Name of the Azure table to store projected data in."
}
},
"required": [
"generatedKeyName",
"tableName"
],
"allOf": [
{
"$ref": "#/definitions/SearchIndexerKnowledgeStoreProjectionSelector"
}
],
"description": "Description for what data to store in Azure Tables."
},
"SearchIndexerKnowledgeStoreObjectProjectionSelector": {
"allOf": [
{
"$ref": "#/definitions/SearchIndexerKnowledgeStoreBlobProjectionSelector"
}
],
"description": "Projection definition for what data to store in Azure Blob."
},
"SearchIndexerKnowledgeStoreFileProjectionSelector": {
"allOf": [
{
"$ref": "#/definitions/SearchIndexerKnowledgeStoreBlobProjectionSelector"
}
],
"description": "Projection definition for what data to store in Azure Files."
},
"SearchIndexerSkill": {
"discriminator": "@odata.type",
"properties": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,52 @@
"httpHeaders": {}
}
],
"knowledgeStore": {
"storageConnectionString": "DefaultEndpointsProtocol=https;AccountName=myStorage;AccountKey=myStorageKey;EndpointSuffix=core.windows.net",
"projections": [
{
"tables": [
{
"tableName": "Reviews",
"generatedKeyName": "ReviewId",
"source": "/document/Review",
"sourceContext": null,
"inputs": []
},
{
"tableName": "Sentences",
"generatedKeyName": "SentenceId",
"source": "/document/Review/Sentences/*",
"sourceContext": null,
"inputs": []
},
{
"tableName": "KeyPhrases",
"generatedKeyName": "KeyPhraseId",
"source": "/document/Review/Sentences/*/KeyPhrases",
"sourceContext": null,
"inputs": []
},
{
"tableName": "Entities",
"generatedKeyName": "EntityId",
"source": "/document/Review/Sentences/*/Entities/*",
"sourceContext": null,
"inputs": []
}
]
},
{
"objects": [
{
"storageContainer": "Reviews",
"source": "/document/Review",
"generatedKeyName": "/document/Review/Id"
}
]
}
]
},
"encryptionKey": {
"keyVaultKeyName": "myUserManagedEncryptionKey-createdinAzureKeyVault",
"keyVaultKeyVersion": "myKeyVersion-32charAlphaNumericString",
Expand Down
Loading

0 comments on commit af7a216

Please sign in to comment.