ERROR 2018/12/28 09:47:00 Bulk response item: {"_index":"events","_type":"_doc","_id":"5bff91647395d80013fa5f8e","status":400,"error":{"type":"mapper_parsing_exception","reason":"failed to parse [data.coupon_applied]","caused_by":{"reason":"Current token (START_OBJECT) not of boolean type\n at [Source: org.elasticsearch.common.bytes.BytesReference$MarkSupportingStreamInputWrapper@79f245e6; line: 1, column: 133]","type":"json_parse_exception"}}}
The problem is, data.coupon_applied has boolean and json values in our MongoDB database. How can I modify the type in elasticsearch so it can accept both values?
If you need to index the content, you have to either convert false to null or to {} this can be done in your application when you extract data from MongoDB, using ingest node or by changing the data model in MongoDB.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.