i know how can use regex in script. example:
"aggs": { "inventary": { "sum": { "script": "(doc['action'].value == /^request/) ? 1 : 0" } } }
so match every action
matches request*
it possible?
thank you
yes, need use ==~
instead of ==
"aggs": { "inventary": { "sum": { "script": "(doc.action.value ==~ /^request/) ? 1 : 0" } } }
Comments
Post a Comment