This PR fix 2 issues related with the script exectuion
Fix the query when using --expressionlanguage jexl. Previously, the query includes all the grouops that have the expressionlanguage field. This increases the number of documents found and it is not relevant since the default value is legacy. The new behavior for jexl mode is not including new documents to the query
Before this PR, the script only replace the expressionvalue if exists. This is not helping when the devices or groups does not have that parameter defined (remember, the default value is legacy, and, if not present, would be legacy as well after the actuation). The new behaviour is just forcing to append "expressionlanguage":"jexl" to each document modified
This PR fix 2 issues related with the script exectuion
--expressionlanguage jexl
. Previously, the query includes all the grouops that have theexpressionlanguage
field. This increases the number of documents found and it is not relevant since the default value is legacy. The new behavior forjexl
mode is not including new documents to the query"expressionlanguage":"jexl"
to each document modified