Hi
First time user of elasticsearch - I have attempted to download the sample data from Sample Data, in particular, the bank sample data. The syntax to add the mapping for the bank data (which is missing) is as follows
{
"mappings" : {
"_default_" : {
"properties" : {
"account_number" : {"type": "integer", "index" : "not_analyzed" },
"balance" : {"type": "integer", "index" : "not_analyzed" },
"firstname" : {"type": "string", "index" : "not_analyzed" },
"lastname" : {"type": "string", "index" : "not_analyzed" },
"age" : {"type": "integer", "index" : "not_analyzed" },
"gender" : {"type": "string", "index" : "not_analyzed" },
"address" : {"type": "string", "index" : "not_analyzed" },
"employer" : {"type": "string", "index" : "not_analyzed" },
"email" : {"type": "string", "index" : "not_analyzed" },
"city" : {"type": "string", "index" : "not_analyzed" },
"state" : {"type": "string", "index" : "not_analyzed" }
}
}
}
}
However when I attempt to add in the sample data via postman at localhost:9200/bank/_bulk
I get the following error
{
"error": {
"root_cause": [
{
"type": "action_request_validation_exception",
"reason": "Validation Failed: 1: type is missing;2: type is missing;3: type is missing;4: type is missing;5: type is missing;6: type is missing;7: type is missing;8: type is missing;9: type is missing;10: type is missing;11: type is missing;12: type is missing;13: type is missing;14: type is missing;15:
Any ideas? Thanks