You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In both cases we get an error like this: x_content_parse_exception: [parse_exception] Reason: Array elements in include/exclude clauses should be string values, Location: undefined, Path: undefined
I managed to trace the problem to \node_modules\graphql-compose-elasticsearch\lib\elasticDSL\Aggs\Aggs.js convertAggsRules
This function converts the strings in the first example to this: { terms: { field: 'source__keyword', exclude: [{0: 'O', 1: 't', 2: 'h', 3: 'e', 4: 'r'}, {0: 'u', 1: 'n', 2: 'k', 3: 'n', 4: 'o', 5: 'w', 6: 'n'}] } }
We are on node version 16.16.0.
Adding this line at the start of the convertAggsRules function fixes the problem: if (typeof rules === 'string') return rules;
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
Here are 2 examples of aggregations that this issue applies to:
{ terms: { field: 'source__keyword', exclude: ['Other', 'unknown'] } }
{ filter: { query_string: { query, fields: ['title', 'body'], } } }
In both cases we get an error like this:
x_content_parse_exception: [parse_exception] Reason: Array elements in include/exclude clauses should be string values, Location: undefined, Path: undefined
I managed to trace the problem to
\node_modules\graphql-compose-elasticsearch\lib\elasticDSL\Aggs\Aggs.js convertAggsRules
This function converts the strings in the first example to this:
{ terms: { field: 'source__keyword', exclude: [{0: 'O', 1: 't', 2: 'h', 3: 'e', 4: 'r'}, {0: 'u', 1: 'n', 2: 'k', 3: 'n', 4: 'o', 5: 'w', 6: 'n'}] } }
We are on node version 16.16.0.
Adding this line at the start of the
convertAggsRules
function fixes the problem:if (typeof rules === 'string') return rules;
The text was updated successfully, but these errors were encountered: