It appears that the errors you're encountering are associated with modifications to your Azure Cognitive Search solution, particularly in the skillset and indexer configurations. Let's break down the errors and discuss potential solutions:
1.Existing field 'language' cannot be changed:
{"error":{"code":"OperationNotAllowed","message":"Existing field 'language' cannot be changed.","details":[{"code":"CannotChangeExistingField","message":"Existing field 'language' cannot be changed."}]}}
This error signals an attempt to alter a field ('language') in the skillset, which Azure Cognitive Search does not permit once fields are defined. To address this, consider creating a new skillset the configuration without modifying existing fields.
2.Output field mapping specifies target field 'sentiment' that doesn't exist in the index:
{"error":{"code":"","message":"Output field mapping specifies target field 'sentiment' that doesn't exist in the index"}}
This error implies that the target field ('sentiment') specified in the output field mapping of your indexer doesn't exist in the index. Verify that the target field in the output field mapping exactly matches an existing field in your index. If the field doesn't exist, add it to your index schema.
3.Rerunning the indexer:
Rerunning the indexerResetting the indexerWaiting for 5 seconds, press CTRL+C to quit ... 0-----Rerunning the indexer
After fixing the issues mentioned above, you can reset and rerun the indexer. This step ensures the application of changes made to the skillset and index.
Here are the steps you can take to resolve these issues:
1.Review the skillset configuration and ensure that you are not trying to modify existing fields.
2.Validate the output field mapping in the indexer, ensuring the target fields exist in the index.
3.Create a new skillset or modify the existing one without changing existing fields if necessary.
4.Update the output field mapping to use valid target fields in the index. Refer to the https://learn.microsoft.com/en-us/azure/search/ for the specific API version you are using.
5.Reset and rerun the indexer after implementing the required changes.
Thoroughly review your Azure Cognitive Search configuration files, ensuring consistency among skillset definitions, index schemas, and indexer configurations.
Referral thread link: Error when trying to run modify-search.cmd · Issue #62 · MicrosoftLearning/AI-102-AIEngineer (github.com)
Additional reading:
https://learn.microsoft.com/en-us/rest/api/searchservice/addupdate-or-delete-documents
https://learn.microsoft.com/en-us/azure/search/cognitive-search-common-errors-warnings
If you have found the answer provided to be helpful, please click on the "Accept answer" button so that it is useful for other members in the Microsoft Q&A community.
If you encounter any future issues, please feel free to contact us, and we will be pleased to assist you further.