Description
The updateAnalyzer method in ContentUnderstandingClient currently has documentation that says only "Update analyzer properties" without specifying which properties can actually be updated.
The underlying REST API uses PATCH with application/merge-patch+json, and only description and tags are accepted by the service. All other properties (models, fieldSchema, config, baseAnalyzerId, dynamicFieldSchema, processingLocation, knowledgeSources) are create-only — they are silently ignored by the server even though it returns HTTP 200.
Requested Improvements
-
API doc (Javadoc): Add documentation to updateAnalyzer listing the updatable properties and noting that other properties require createAnalyzer with allowReplace(true).
-
Samples: If an update analyzer sample exists, add a note explaining that only description and tags are updatable via this method, and reference createAnalyzer with allowReplace(true) for changing models, fieldSchema, etc.
Updatable Properties
| Property |
Updatable via updateAnalyzer (PATCH)? |
description |
Yes |
tags |
Yes |
models |
No — silently ignored |
fieldSchema |
No — silently ignored |
config |
No — silently ignored |
baseAnalyzerId |
No — silently ignored |
dynamicFieldSchema |
No — silently ignored |
processingLocation |
No — silently ignored |
knowledgeSources |
No — silently ignored |
Workaround
To change create-only properties on an existing analyzer, use createAnalyzer with allowReplace(true). This calls PUT (full resource replacement) instead of PATCH.
Related
Description
The
updateAnalyzermethod inContentUnderstandingClientcurrently has documentation that says only "Update analyzer properties" without specifying which properties can actually be updated.The underlying REST API uses
PATCHwithapplication/merge-patch+json, and onlydescriptionandtagsare accepted by the service. All other properties (models,fieldSchema,config,baseAnalyzerId,dynamicFieldSchema,processingLocation,knowledgeSources) are create-only — they are silently ignored by the server even though it returns HTTP 200.Requested Improvements
API doc (Javadoc): Add documentation to
updateAnalyzerlisting the updatable properties and noting that other properties requirecreateAnalyzerwithallowReplace(true).Samples: If an update analyzer sample exists, add a note explaining that only
descriptionandtagsare updatable via this method, and referencecreateAnalyzerwithallowReplace(true)for changingmodels,fieldSchema, etc.Updatable Properties
updateAnalyzer(PATCH)?descriptiontagsmodelsfieldSchemaconfigbaseAnalyzerIddynamicFieldSchemaprocessingLocationknowledgeSourcesWorkaround
To change create-only properties on an existing analyzer, use
createAnalyzerwithallowReplace(true). This callsPUT(full resource replacement) instead ofPATCH.Related
UpdateAnalyzerAsyncnot updatingmodels