Let's say I have documents coming into my ES from different sources. Source A(index name = "abde") has the following mapping:
{
"field1": {
"type": "text"
},
"field2" : {
"type": "text"
},
"field3" : {
"ignore_above": 256,
"type": "keyword"
},
"field4" : {
"ignore_above": 256,
"type": "keyword"
}
}
Source B (index name = "abcd" )has the following mapping:
{
"field1": {
"type": "text"
},
"field2" : {
"type": "text"
},
"field5" : {
"ignore_above": 256,
"type": "keyword"
},
"field4" : {
"ignore_above": 256,
"type": "keyword"
}
}
So is it advisable to have separate index templates(one for abcd* and one for abde*) for them or a single one (just one template for ab*) consisting of union of all the fields. (I also need to keep in mind that there are some common fields in the different sources, which should be searchable across the different indices).
Would the searches be affected if I use either of the two approaches?
Also the example I gave contains just 4 fields. The actual scenario has around 100 fields.
Any help would be appreciated.