You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have created an index with its specific settings and mappings for the data fields.
When I try to bulk insert my dataframe calling saveToOpenSearch, I get the following error: Could not write all entries for bulk operation [1000/1000]. Error sample (first [5] error messages): org.opensearch.hadoop.rest.OpenSearchHadoopRemoteException: illegal_argument_exception: mapper [field.x] cannot be changed from type [keyword] to [text]...
Most likely because saveToOpenSearch is assuming a dynamic mapping and not the defined mapping from the index.
I can't find any reference in the docs of saveToOpenSearch supporting the mappings definitions for the index as an argument. Is this a bug? or am I missing something here?
I don't get this behavior when the index has been created without any mappings or if it does not exists and is automatically created by the saveToOpenSearch function call.
What is the bug?
I have created an index with its specific settings and mappings for the data fields.
When I try to bulk insert my dataframe calling
saveToOpenSearch
, I get the following error:Could not write all entries for bulk operation [1000/1000]. Error sample (first [5] error messages): org.opensearch.hadoop.rest.OpenSearchHadoopRemoteException: illegal_argument_exception: mapper [field.x] cannot be changed from type [keyword] to [text]...
Most likely because
saveToOpenSearch
is assuming a dynamic mapping and not the defined mapping from the index.I can't find any reference in the docs of
saveToOpenSearch
supporting the mappings definitions for the index as an argument. Is this a bug? or am I missing something here?I don't get this behavior when the index has been created without any mappings or if it does not exists and is automatically created by the saveToOpenSearch function call.
How can one reproduce the bug?
Create the index
Push data to OpenSearch
What is the expected behavior?
I expect the records to be added to the index similarly to saveToOpenSearch function automatically creates the index.
What is your host/environment?
Operating system, version.
Scala 2.12
Spark 3.4.1
OpenSearch 1.3.2
opensearch-hadoop:1.1.0
The text was updated successfully, but these errors were encountered: