I am trying to create one index with multiple types for each data source.
The following mapping does create mapping for one type:
curl -XPUT localhost:9200/test -d '{
"settings" : {
"number_of_shards" : 1
},
"mappings" : {
"type1" : {
"_source" : { "enabled" : false },
"properties" : {
"field1" : { "type" : "string", "index" : "not_analyzed" }
}
}
},
"mappings" : {
"type2" : {
"_source" : { "enabled" : false },
"properties" : {
"source1" : { "type" : "string", "index" : "not_analyzed" }
}
}
}
}'
When I run this:
curl -X GET 'http://localhost:9200/test/tpe1/_mapping?pretty=true'
Nothing is displayed.
How can I create mapping for multiple types in elastic search?