mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
- ISSUE [Dashboard] Visualize Library doesn't work filter on scripted fields of Array Type. #148942 Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Lukas Olson <lukas@elastic.co>
This commit is contained in:
parent
611e5af179
commit
95c2493e77
2 changed files with 2 additions and 2 deletions
|
@ -134,7 +134,7 @@ describe('buildInlineScriptForPhraseFilter', () => {
|
|||
};
|
||||
|
||||
const expected =
|
||||
`boolean compare(Supplier s, def v) {return s.get() == v;}` +
|
||||
`boolean compare(Supplier s, def v) {if(s.get() instanceof List){List list = s.get(); for(def k : list){if(k==v){return true;}}return false;}else{return s.get() == v;}}` +
|
||||
`compare(() -> { return foo; }, params.value);`;
|
||||
|
||||
expect(buildInlineScriptForPhraseFilter(field)).toBe(expected);
|
||||
|
|
|
@ -148,7 +148,7 @@ export const buildInlineScriptForPhraseFilter = (scriptedField: DataViewFieldBas
|
|||
// We must wrap painless scripts in a lambda in case they're more than a simple expression
|
||||
if (scriptedField.lang === 'painless') {
|
||||
return (
|
||||
`boolean compare(Supplier s, def v) {return s.get() == v;}` +
|
||||
`boolean compare(Supplier s, def v) {if(s.get() instanceof List){List list = s.get(); for(def k : list){if(k==v){return true;}}return false;}else{return s.get() == v;}}` +
|
||||
`compare(() -> { ${scriptedField.script} }, params.value);`
|
||||
);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue