Issue #14379 is a very similar symptom for other data types, but the cause appears to be different. I have a fix ready to go for #14379 but this issue appears to be related to XContent serialization and it wasn't immediately obvious to me how to fix it, so I've created a separate issue. Also the other issue was a regression introduced in OpenSearch 2.8, whereas this issue appears to have existed prior to OpenSearch 2.8.
Related component
Indexing
To Reproduce
Index a document with the pipeline defined above.
Expected behavior
Success
Additional Details
1> Caused by: java.lang.IllegalArgumentException: cannot write xcontent for unknown value of type class java.lang.Character
1> at org.opensearch.core.xcontent.XContentBuilder.unknownValue(XContentBuilder.java:866)
1> at org.opensearch.core.xcontent.XContentBuilder.map(XContentBuilder.java:928)
1> at org.opensearch.core.xcontent.XContentBuilder.map(XContentBuilder.java:903)
1> at org.opensearch.action.index.IndexRequest.source(IndexRequest.java:384)
1> at org.opensearch.ingest.IngestService.updateIndexRequestWithIngestDocument(IngestService.java:1314)
1> at org.opensearch.ingest.IngestService.lambda$innerExecute$11(IngestService.java:1044)
1> at org.opensearch.ingest.IngestDocument.lambda$executePipeline$0(IngestDocument.java:814)
1> at org.opensearch.ingest.Pipeline.lambda$execute$0(Pipeline.java:140)
1> at org.opensearch.ingest.CompoundProcessor.innerExecute(CompoundProcessor.java:260)
1> at org.opensearch.ingest.CompoundProcessor.lambda$innerExecute$4(CompoundProcessor.java:287)
1> at org.opensearch.ingest.Processor.execute(Processor.java:77)
1> at org.opensearch.ingest.CompoundProcessor.innerExecute(CompoundProcessor.java:269)
1> at org.opensearch.ingest.CompoundProcessor.lambda$innerExecute$4(CompoundProcessor.java:287)
1> at org.opensearch.ingest.Processor.execute(Processor.java:77)
1> at org.opensearch.ingest.CompoundProcessor.innerExecute(CompoundProcessor.java:269)
1> at org.opensearch.ingest.CompoundProcessor.execute(CompoundProcessor.java:153)
1> at org.opensearch.ingest.Pipeline.execute(Pipeline.java:134)
1> at org.opensearch.ingest.IngestDocument.executePipeline(IngestDocument.java:807)
1> at org.opensearch.ingest.IngestService.innerExecute(IngestService.java:1034)
1> at org.opensearch.ingest.IngestService.executePipelines(IngestService.java:881)
1> ... 6 more
Describe the bug
The following ingest pipeline will fail when indexing a document:
Issue #14379 is a very similar symptom for other data types, but the cause appears to be different. I have a fix ready to go for #14379 but this issue appears to be related to XContent serialization and it wasn't immediately obvious to me how to fix it, so I've created a separate issue. Also the other issue was a regression introduced in OpenSearch 2.8, whereas this issue appears to have existed prior to OpenSearch 2.8.
Related component
Indexing
To Reproduce
Index a document with the pipeline defined above.
Expected behavior
Success
Additional Details