I got the following error when I try to reindex from v4 to v5. [edit] v2 to v5
Can't parse boolean value [{format=disabled}], expected [true] or [false]
There should no be any boolean value, I can confirm it when I get the mappings from version 4.
I got the following error when I try to reindex from v4 to v5. [edit] v2 to v5
Can't parse boolean value [{format=disabled}], expected [true] or [false]
There should no be any boolean value, I can confirm it when I get the mappings from version 4.
Version 4 of elasticsearch does not exist.
Can you give more detail on what you are doing exactly? Which commands?
RE-INDEX
POST _reindex
{
"source":
{
"index": "logfile-2017.01"
},
"dest":
{
"index": "2017.01-1"
}
}
getting mapping (source index)
get /logfile-2017.01/_mappings
Error:
"cause": {
"type": "mapper_parsing_exception",
"reason": "failed to parse",
"caused_by": {
"type": "illegal_argument_exception",
"reason": "Can't parse boolean value [{format=disabled}], expected [true] or [false]"
}
So when you call GET _mapping
you are getting this error?
Or you are getting this error when you call _reindex
API?
when I call _reindex
But reindex does not push any mapping AFAIK. Can you post the full error? And elasticsearch logs?
Hmmm. Actually I think I understand.
You are probably using dynamic mapping. You have a first document which comes with format: true
then a second one with format: disabled
. Am I correct?
I dont see any format field under dynamic_fields->boolean_fields
I have explicited added but I go the same error:
"boolean_fields": {
"match": "*",
"match_mapping_type": "boolean",
"mapping": {
"fielddata": {
"format": "true"
},
"fields": {
"keyword": {
"type": "keyword"
}
},
"norms": false,
"type": "text"
}
}
That's not what I'm saying.
Do you have a field named format
in your old index?
If so, for the mapping of the target index to be a keyword
for this field instead of a boolean
and try to reindex again.
there is no field named format
....
Ok. Can you give please the result of GET _template?pretty
, the result of GET logfile-2017.01/_search?pretty&size=1
?
I expect to get a boolean field in the result of the old index mapping, but i cant see any boolean.
Furthermore there is no true/false value in any document.
Why does it complain about a boolean field?
I don't know.
I have posted below the requested outputs:
Output of GET _templates
"mappings": {
"_default_": {
"dynamic_templates": [
{
"message_field": {
"path_match": "message",
"mapping": {
"norms": false,
"type": "text"
},
"match_mapping_type": "string"
}
},
{
"string_fields": {
"mapping": {
"fielddata": true,
"norms": false,
"type": "text",
"fields": {
"keyword": {
"type": "keyword"
}
}
},
"match_mapping_type": "string",
"match": "*"
}
},
{
"boolean_fields": {
"mapping": {
"fielddata": true,
"norms": false,
"type": "text",
"fields": {
"keyword": {
"type": "keyword"
}
}
},
"match_mapping_type": "boolean",
"match": "*"
}
}
],
"_all": {
"norms": false,
"enabled": true
},
"properties": {
"@timestamp": {
"include_in_all": false,
"type": "date"
},
"geoip": {
"dynamic": true,
"properties": {
"ip": {
"type": "ip"
},
"latitude": {
"type": "half_float"
},
"location": {
"type": "geo_point"
},
"longitude": {
"type": "half_float"
}
}
},
"logdate": {
"type": "date"
}
}
}
},
"aliases": {
"logfiles": {}
}
}
Output from _search
{
"took": 7,
"timed_out": false,
"_shards": {
"total": 2,
"successful": 2,
"failed": 0
},
"hits": {
"total": 316403,
"max_score": 1,
"hits": [
{
"_index": "logfile-2017.01",
"_type": "logs",
"_id": "AVnaJ09QlJpm_17whLrF",
"_score": 1,
"_source": {
"message": "value_1 | 2017-01-02 07:28:47,457 aaa traffic from 127.0.0.1: {'function_code': None, 'slave_id': 22, 'request': '111111111111', 'response': ''} (d0dd7fba-61c1-4d96-9de0-0e0846a482a7)",
"@version": "1",
"@timestamp": "2017-01-02T06:28:47.457Z",
"tags": [
"logs",
"beats_input_codec_plain_applied",
"_grokparsefailure"
],
"source": "logs.log",
"input_type": "log",
"offset": 2243301,
"type": "logs",
"beat": {
"name": "machine1",
"hostname": "machine1",
"version": "5.1.1"
},
"host": "machine1",
"color": "value_1",
"time": "2017-01-02 07:28:47,457",
"names": "aaa",
"parameters": "None",
"numbers": "22",
"codes": "111111111111",
"uuid": "d0dd7fba-61c1-4d96-9de0-0e0846a482a7",
"cities": "from",
"ips": "127.0.0.1"
}
}
]
}
}
Thanks.
Can you run this:
GET /_search
{
"query": {
"exists" : { "field" : "format" }
}
}
{
"took": 2,
"timed_out": false,
"_shards": {
"total": 2,
"successful": 2,
"failed": 0
},
"hits": {
"total": 0,
"max_score": null,
"hits": []
}
}
I have no idea. @nik9000 Does this ring a bell?
We can close this issue. There was an old template, which it should ve been deleted before calling re-index API.'
Thx for the help
Where was it in GET _templates?
Can't see it.
© 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.