Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify Cognitive Search Swagger #3386

Merged
merged 6 commits into from
Jul 18, 2018
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -573,9 +573,9 @@
"x-ms-examples": {
"SearchServiceGetSkillset": { "$ref": "./examples/SearchServiceGetSkillset.json" }
},
"description": "Retrieves a Cognitive Search skillset in an Azure Search service.",
"description": "Retrieves a cognitive skillset in an Azure Search service.",
"externalDocs": {
"url": "https://docs.microsoft.com/azure/search/cognitive-search-tutorial-blob"
"url": "https://docs.microsoft.com/rest/api/searchservice/get-skillset"
},
"parameters": [
{
Expand Down Expand Up @@ -608,9 +608,9 @@
"x-ms-examples": {
"SearchServiceCreateOrUpdateSkillset": { "$ref": "./examples/SearchServiceCreateOrUpdateSkillset.json" }
},
"description": "Creates a new Cognitive Search skillset in an Azure Search service.",
"description": "Creates a new cognitive skillset in an Azure Search service.",
"externalDocs": {
"url": "https://docs.microsoft.com/azure/search/cognitive-search-tutorial-blob"
"url": "https://docs.microsoft.com/rest/api/searchservice/update-skillset"
},
"parameters": [
{
Expand All @@ -627,7 +627,7 @@
"schema": {
"$ref": "#/definitions/Skillset"
},
"description": "The skillset containing one or more Cognitive Search skills to create or update in an Azure Search service."
"description": "The skillset containing one or more cognitive skills to create or update in an Azure Search service."
},
{
"$ref": "#/parameters/ClientRequestIdParameter"
Expand Down Expand Up @@ -661,9 +661,9 @@
"x-ms-examples": {
"SearchServiceDeleteSkillset": { "$ref": "./examples/SearchServiceDeleteSkillset.json" }
},
"description": "Deletes a Cognitive Search skillset in an Azure Search service.",
"description": "Deletes a cognitive skillset in an Azure Search service.",
"externalDocs": {
"url": "https://docs.microsoft.com/azure/search/cognitive-search-tutorial-blob"
"url": "https://docs.microsoft.com/rest/api/searchservice/delete-skillset"
},
"parameters": [
{
Expand Down Expand Up @@ -698,9 +698,9 @@
"x-ms-examples": {
"SearchServiceListSkillsets": { "$ref": "./examples/SearchServiceListSkillsets.json" }
},
"description": "List all Cognitive Search skillsets in an Azure Search service.",
"description": "List all cognitive skillsets in an Azure Search service.",
"externalDocs": {
"url": "https://docs.microsoft.com/azure/search/cognitive-search-tutorial-blob"
"url": "https://docs.microsoft.com/rest/api/searchservice/list-skillset"
},
"parameters": [
{
Expand Down Expand Up @@ -728,7 +728,7 @@
"$ref": "./examples/SearchServiceCreateSkillset.json"
}
},
"description": "Creates a new Cognitive Search skillset in an Azure Search service.",
"description": "Creates a new cognitive skillset in an Azure Search service.",
"externalDocs": {
"url": "https://docs.microsoft.com/rest/api/searchservice/create-skillset"
},
Expand All @@ -740,7 +740,7 @@
"schema": {
"$ref": "#/definitions/Skillset"
},
"description": "The skillset containing one or more Cognitive Search skills to create in an Azure Search service."
"description": "The skillset containing one or more cognitive skills to create in an Azure Search service."
},
{
"$ref": "#/parameters/ClientRequestIdParameter"
Expand Down Expand Up @@ -3431,6 +3431,10 @@
"dataSourceName": {
"type": "string",
"description": "The name of the datasource from which this indexer reads data."
},
"skillsetName": {
"type": "string",
"description": "The name of the cognitive skillset executing with this indexer."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jeji1101 It would be helpful to mention here that you can leave this null if you want an indexer without an associated skillset.

},
"targetIndexName": {
"type": "string",
Expand All @@ -3453,6 +3457,16 @@
"externalDocs": {
"url": "https://docs.microsoft.com/azure/search/search-indexer-field-mappings"
}
},
"outputFieldMappings": {
"type": "array",
"items": {
"$ref": "#/definitions/FieldMapping"
},
"description": "Output field mappings are applied after enrichment and immediately before indexing.",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jeji1101 We don't really define the term "enrichment" here, so maybe it would help to have more context. How about:

"Applicable only to indexers with an associated skillset. Output field mappings are applied after documents are enriched by the skillset, immediately before indexing."

"externalDocs": {
"url": "https://docs.microsoft.com/azure/search/search-indexer-field-mappings"
}
},
"disabled": {
"x-ms-client-name": "IsDisabled",
Expand Down Expand Up @@ -4183,7 +4197,7 @@
"externalDocs": {
"url": "https://docs.microsoft.com/azure/search/cognitive-search-tutorial-blob"
},
"description": "A list of Cognitive Search skills."
"description": "A list of cognitive skills."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this the right description?
only indexers have datasource, skillset and index names

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Synced up with Victor offline on this.

},
"Skill": {
"discriminator": "@odata.type",
Expand All @@ -4197,21 +4211,21 @@
},
"context": {
"type": "string",
"description": "The context of the skill."
"description": "Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content)."
},
"inputs": {
"type": "array",
"items": {
"$ref": "#/definitions/InputFieldMappingEntry"
},
"description": "The inputs of the skill."
"description": "Inputs of the skills could be a column in the source data set, or the output of an upstream skill."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jeji1101 Terminology consistency: Please call it "data source" instead of "source data set".

},
"outputs": {
"type": "array",
"items": {
"$ref": "#/definitions/OutputFieldMappingEntry"
},
"description": "The outputs of the skill."
"description": "The output of a skill is either a field in an Azure Search index, or a value that can be consumed as an input by another skill."
}
},
"required": [
Expand Down Expand Up @@ -4242,16 +4256,20 @@
"properties": {
"name": {
"type": "string",
"description": "The name of the output."
"description": "The name of the output defined by the skill."
},
"targetName": {
"type": "string",
"description": "The target name of the output."
"description": "The target name of the output. It is optional and default to name."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jeji1101 default to name -> defaults to name

}
},
"required": ["name",
"targetName"],
"description": "output field mapping for a skill."
"required": [
"name"
],
"externalDocs": {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jeji1101 This seems like the wrong doc link.

"url": "https://docs.microsoft.com/rest/api/searchservice/naming-rules"
},
"description": "Output field mapping for a skill."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Name of the skill output.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Synced up with Victor offline on this. I will need to add the OutputFieldMappings field into the indexer.

},
"KeyPhraseExtractionSkill": {
"x-ms-discriminator-value": "#Microsoft.Skills.Text.KeyPhraseExtractionSkill",
Expand All @@ -4266,13 +4284,14 @@
"maxKeyPhraseCount": {
"type": "integer",
"format": "int32",
"x-nullable": true
"x-nullable": true,
"description": "A number indicating how many key phrases to return. If absent, all identified key phrases will be returned."
}
},
"externalDocs": {
"url": "https://docs.microsoft.com/azure/search/cognitive-search-skill-keyphrases"
},
"description": "Text analytics key phrase extraction."
"description": "A skill that uses text analytics for key phrase extraction."
},
"OcrSkill": {
"x-ms-discriminator-value": "#Microsoft.Skills.Vision.OcrSkill",
Expand All @@ -4298,7 +4317,7 @@
"externalDocs": {
"url": "https://docs.microsoft.com/azure/search/cognitive-search-skill-ocr"
},
"description": "The skill extracts text from image files."
"description": "A skill that extracts text from image files."
},
"ImageAnalysisSkill": {
"x-ms-discriminator-value": "#Microsoft.Skills.Vision.ImageAnalysisSkill",
Expand All @@ -4313,22 +4332,24 @@
"visualFeatures": {
"type": "array",
"items": {
"$ref": "#/definitions/VisualFeatures"
"$ref": "#/definitions/VisualFeature",
"x-nullable": false
},
"description": "A list of visual features."
},
"details": {
"type": "array",
"items": {
"$ref": "#/definitions/Details"
"$ref": "#/definitions/ImageDetail",
"x-nullable": false
},
"description": "A string indicating which domain-specific details to return."
}
},
"externalDocs": {
"url": "https://docs.microsoft.com/azure/search/cognitive-search-skill-image-analysis"
},
"description": "The skill analyzes image files. It extracts a rich set of visual features based on the image content."
"description": "A skill that analyzes image files. It extracts a rich set of visual features based on the image content."
},
"LanguageDetectionSkill": {
"x-ms-discriminator-value": "#Microsoft.Skills.Text.LanguageDetectionSkill",
Expand All @@ -4338,7 +4359,7 @@
"externalDocs": {
"url": "https://docs.microsoft.com/azure/search/cognitive-search-skill-language-detection"
},
"description": "The skill detects the language of input text and reports a single language code for every document submitted on the request. The language code is paired with a score indicating the strength of the analysis."
"description": "A skill that detects the language of input text and reports a single language code for every document submitted on the request. The language code is paired with a score indicating the confidence of the analysis."
},
"ShaperSkill": {
"x-ms-discriminator-value": "#Microsoft.Skills.Util.ShaperSkill",
Expand All @@ -4348,7 +4369,7 @@
"externalDocs": {
"url": "https://docs.microsoft.com/azure/search/cognitive-search-skill-shaper"
},
"description": "The skill for reshaping the outputs. It creates a complex type to support composite fields (also known as multipart fields)."
"description": "A skill for reshaping the outputs. It creates a complex type to support composite fields (also known as multipart fields)."
},
"MergeSkill": {
"x-ms-discriminator-value": "#Microsoft.Skills.Text.MergeSkill",
Expand All @@ -4359,18 +4380,18 @@
"insertPreTag": {
"type": "string",
"default": " ",
"description": "The tag indicates the start of the merged text."
"description": "The tag indicates the start of the merged text. By default, the tag is an empty space."
},
"insertPostTag": {
"type": "string",
"default": " ",
"description": "The tag indicates the end of the merged text."
"description": "The tag indicates the end of the merged text. By default, the tag is an empty space."
}
},
"externalDocs": {
"url": "https://docs.microsoft.com/azure/search/cognitive-search-skill-textmerger"
},
"description": "The skill for merging the text."
"description": "A skill for merging two or more strings into a single unified string, with an optional user-defined delimiter separating each component part."
},
"NamedEntityRecognitionSkill": {
"x-ms-discriminator-value": "#Microsoft.Skills.Text.NamedEntityRecognitionSkill",
Expand All @@ -4381,7 +4402,8 @@
"categories": {
"type": "array",
"items": {
"$ref": "#/definitions/Categories"
"$ref": "#/definitions/NamedEntityCategory",
"x-nullable": false
},
"description": "A list of named entity categories."
},
Expand Down Expand Up @@ -4415,7 +4437,7 @@
"externalDocs": {
"url": "https://docs.microsoft.com/azure/search/cognitive-search-skill-sentiment"
},
"description": "Text analytics sentiment analysis."
"description": "Text analytics positive-negative sentiment analysis, scored as a floating point value in a range of zero to 1."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jeji1101 "zero to one" or "0 to 1"

},
"SplitSkill": {
"x-ms-discriminator-value": "#Microsoft.Skills.Text.SplitSkill",
Expand All @@ -4429,19 +4451,20 @@
},
"textSplitMode": {
"$ref": "#/definitions/TextSplitMode",
"x-nullable": false,
"description": "A value indicating which split mode to perform."
},
"maximumPageLength": {
"type": "integer",
"format": "int32",
"x-nullable": true,
"description": "The desired maximum page length."
"description": "The desired maximum page length. Default is 10000."
}
},
"externalDocs": {
"url": "https://docs.microsoft.com/azure/search/cognitive-search-skill-textsplit"
},
"description": "The skill to split text."
"description": "A skill to split a string into chunks of text."
},
"WebApiSkill": {
"x-ms-discriminator-value": "#Microsoft.Skills.Custom.WebApiSkill",
Expand All @@ -4451,7 +4474,7 @@
"properties": {
"uri": {
"type": "string",
"description": "The url for the Web Api."
"description": "The url for the Web API."
},
"httpHeaders": {
"$ref": "#/definitions/WebApiHttpHeaders",
Expand All @@ -4464,13 +4487,13 @@
"timeout": {
"type": "string",
"format": "duration",
"description": "The desired timeout for the request."
"description": "The desired timeout for the request. Default is 30 seconds."
},
"batchSize": {
"type": "integer",
"format": "int32",
"x-nullable": true,
"description": "The desired batch size."
"description": "The desired batch size which indicates number of documents."
}
},
"required": [
Expand All @@ -4479,7 +4502,7 @@
"externalDocs": {
"url": "https://docs.microsoft.com/azure/search/cognitive-search-custom-skill-interface"
},
"description": "The customized Web Api skill."
"description": "A skill that can call a Web API endpoint, allowing you to extend a skillset by having it call your custom code."
},
"WebApiHttpHeaders": {
"properties": {
Expand All @@ -4504,7 +4527,7 @@
"description": "The skillsets defined in the Search service."
}
},
"description": "Response from a List skillset request. If successful, it includes the full definitions of all skillsets."
"description": "Response from a list Skillset request. If successful, it includes the full definitions of all skillsets."
},
"TextExtractionAlgorithm": {
"type": "string",
Expand All @@ -4530,7 +4553,7 @@
},
"description": "A value indicating which split mode to perform."
},
"VisualFeatures": {
"VisualFeature": {
"type": "string",
"enum": [
"categories",
Expand All @@ -4541,32 +4564,32 @@
"color"
],
"x-ms-enum": {
"name": "VisualFeatures",
"name": "VisualFeature",
"modelAsString": false
},
"description": "The strings indicating what visual feature types to return."
},
"Details": {
"ImageDetail": {
"type": "string",
"enum": [
"celebrities",
"landmarks"
],
"x-ms-enum": {
"name": "Details",
"name": "ImageDetail",
"modelAsString": false
},
"description": "A string indicating which domain-specific details to return."
},
"Categories": {
"NamedEntityCategory": {
"type": "string",
"enum": [
"location",
"organization",
"person"
],
"x-ms-enum": {
"name": "Categories",
"name": "NamedEntityCategory",
"modelAsString": false
},
"description": "A string indicating which named entity categories to return."
Expand Down Expand Up @@ -4836,4 +4859,4 @@
"x-ms-parameter-location": "client"
}
}
}
}