Closed
Description
As far as I understand it, fields are resolved on a first found basis. So given the following documents:
PUT /index/foo/1
{
"count": 1,
"foo": {
"count": 1
}
}
PUT /index/bar/2
{
"count": 1,
"foo": {
"count": 1
}
}
.... the field foo.count
could resolve to foo.count
, foo.foo.count
, or bar.foo.count
, depending on which is found first.
Field resolution should be unambiguous. Field names should be grouped by type and sorted in descending order by number of .
. So the above mappings should result in:
bar:
foo.count
count
foo:
foo.count
count
Then if no type is specified (or multiple types are specified), go through the groups in alphabetical order.
This would result in the following resolutions:
foo.foo.count => (foo) foo.count
foo.count => (foo) count
count => (bar) count
*.foo.count => (bar) foo.count
*.count => (bar) count
*.*.count => (bar) foo.count