Failed to parse [searchtext];
nested: MapperParsingException[failed to parse date field [], tried both date format [dateOptionalTime], and timestamp number];
nested: IllegalArgumentException[Invalid format: "".
I am getting the above error messsage while inserting docs with json data. The error field searchtext is of string datatype but it throwing exception as datetime.
i dont know what went wrong.. Advice to overcome this issue..
It looks like the field has been mapped as a date and you're trying to index a document where the field doesn't contain a date. If the field shouldn't be a date field you need to reindex. You should probably explicitly define the field as a string field to avoid having this happening again.
AFAIK you can't set the mapping of a field when you're indexing a document. Mappings are set either when you create the index (possibly implicitly via an index template) or with a put mapping API call (as long as the field whose mapping you're trying to define doesn't already exist).
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.