We are in the middle of doing a POC with ES for our logging. We are talking to ES directly from our application and when a webrequest comes in it stores it in ES. It logs a "body" field to save posted body data in ES. But if you perform a get, that field contains a boolean "false", because there is no body. If we then have a post request which has actual body data ES gives an error because it expects a boolean in that field. Is there any way around this?
That's because you sent it that way I believe.
What happened (that's a guess as I don't have much details here, like a way to reproduce the problem) is that the first document cames with a boolean value and that you did not define any mapping or template.
Elasticsearch then decided that the mapping for this field is a boolean.
The next document which is coming with a value (a text) can not be indexed as a boolean and it fails.
I'd recommend fixing the mapping before sending the very first document. So you won't use dynamic mapping anymore.
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.