-
-
Save anonymous/c6a7c2063a4f696c79aa to your computer and use it in GitHub Desktop.
Problematic template mapping
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -XPUT "http://localhost:9200/documents-2012-02-05/document/" -T ~/tmp/testdocument.json -d ' | |
{ | |
"file-path" : "2012/02/05/basketball/l.nba.com/standings/xt.15250060-nba-days.xml", | |
"file-creation-time" : "20120205T151456.000Z", | |
"date-time" : "20120205T151700.000Z" | |
} | |
' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"error":"MapperParsingException[mapping [date]]; nested: MapperParsingException[Trying to parse an object but has a different type [date] for [date]]; ","status":400} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"template_document":{ | |
"template":"documents-*", | |
"settings":{ | |
"index.refresh_interval":"5s", | |
"number_of_shards":1, | |
"number_of_replicas":1, | |
"refresh_interval":"1s", | |
"index.query.default_field":"file-creation-time" | |
}, | |
"mappings":{ | |
"_default_":{ | |
"date_detection" : 0, | |
"_all":{ | |
"enabled":false | |
}, | |
"_source":{ | |
"enabled":false | |
} | |
}, | |
"document":{ | |
"properties":{ | |
"_id":{ | |
"type":"string", | |
"path":"file-path" | |
}, | |
"file-path":{ | |
"type":"string", | |
"store":true, | |
"index":"not_analyzed", | |
"null_value":"", | |
"include_in_all":true | |
}, | |
"file-creation-time":{ | |
"type":"date", | |
"format":"basic_date_time", | |
"store":true, | |
"include_in_all":true | |
}, | |
"date-time":{ | |
"type":"date", | |
"format":"basic_date_time", | |
"store":false, | |
"include_in_all":false | |
} | |
} | |
} | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"file-path" : "2012/02/05/basketball/l.nba.com/standings/xt.15250060-nba-days.xml", | |
"file-creation-time" : "20120205T151456.000Z", | |
"date-time" : "20120205T151700.000Z" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment