Some of the value for field price is "-",so I want to replace it with 0 by gsub processor ,then I write the following code, however it doesn't work, how to write code?
BTW, the ES version is 5.5, and I mapped the type of price to double.
The following error message got from the filebeat log file"{"type":"mapper_parsing_exception","reason":"failed to parse [price]","caused_by":{"type":"number_format_exception","reason":"For input string: "-""}}"
have you tried replacement: "0.0" plus a convert processor to change your fieldname?
Also please change your full pipeline, or at least provide a full reproducible example using the simulate pipeline API, this makes it a hundred times easier for others to check out your example.
A full reproducible example would be great. Maybe you can use the Ingest Simulate API, which can contain the pipeline and sample documents in a single API call. That would help a lot!
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.