In Elastic
for field of type date , even if the ignore malformed attribute is set to true , it indexes the malformed data into this field.
Ideally this field value should be empty in case the incoming data is malformed.
In Elastic
for field of type date , even if the ignore malformed attribute is set to true , it indexes the malformed data into this field.
Ideally this field value should be empty in case the incoming data is malformed.
Can you send a script which reproduce your issue? Including mapping creation...
Index Creation as follows :
curl -XPUT "http://localhost:9200/testindex?pretty" -d'
{
"mappings": {
"testmapping" : {
"properties": {
"date": {"format": "strict_date_optional_time", "ignore_malformed": true, "type": "date" }
}
}
}
}
'
insert data as follows :
curl -XPOST localhost:9200/testindex/testmapping -d '{
"date" : "8.1/10"
}'
As a result of above data gets indexed , ideally the field value should be empty as it's malformed.
But I'm sure you can't search for that field.
The field actually has not been indexed. You can still see it in the _source
field because we don't modify what you are sending but it does not mean that the field has been indexed.
I can search the document using
http://localhost:9200/testindex/_search?pretty=true&q=:
The document is indexed. All fields but this one are indexed. If you want to reject the whole document don't set the ignore malformed setting
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
© 2020. All Rights Reserved - Elasticsearch
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.