I have a query:
{
"query": { "bool": { "filter": [
{ "terms": { "foo": ... (1000 terms) } },
{ "terms": { "bar": ... (1000 terms) } }
] } }
}
which works just fine as is. But if I run those terms off a runtime mapping...
{
"runtime_mappins": {
"foo-a": { "type": "keyword", "script": "emit(doc['foo'].value)" },
"bar-a": { "type": "keyword", "script": "emit(doc['bar'].value)" },
},
"query": { "bool": { "filter": [
{ "terms": { "foo-a": ... (1000 terms) } },
{ "terms": { "bar-a": ... (1000 terms) } }
] } }
}
it fails with lots of
{
"type": "too_many_nested_clauses",
"reason": "too_many_nested_clauses: Query contains too many nested clauses; maxClauseCount is set to 1024"
},
Anyone have a clue why? It should only be 2 clauses - and without the runtime mapping, it seems to behave as such; it's only with the runtime mapping it complains