Hello,
I have two questions:
- I know that a field mapping (with same name) must be unique accross types in an index, but does this apply also when the field is inside two different objects?
Like:
"mappings": {
"type1": {
"properties": {
"Object1": {
"properties": {
"Field1": {
"type": "string"
}
}
},
"Object2": {
"properties": {
"Field1": {
"type": "integer"
}
}
}
}
}
}
To make it short, is Object1.Field1 the same field as Object2.Field1 or are they differents, and so, can have a different mapping, because they are not in the same scope/namespace?
- I would like to know if a filter "context" is transmitted to all its sub-queries.
For instance:
"query": {
"bool": {
"filter": {
"bool": {
"must":
[
{"term": ...},
...
],
"should:
[
{"term": ...},
...
]
}
},
"must": [...]
}
}
Do both the "term" queries above operate in the filter context introduced by the first "bool" query?
Or do we have to wrap them again in a "filter" clause in the second "bool" query?
Thanks
Olivier L.