-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[savedObjects] add experimental filter definition syntax
- Loading branch information
Showing
18 changed files
with
960 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
278 changes: 278 additions & 0 deletions
278
...aved_objects/client/lib/search_dsl/experimental_filter/__snapshots__/convert.test.js.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,278 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`SavedObjectsClient/experimentalFilter properly converts complex example 1`] = ` | ||
Object { | ||
"bool": Object { | ||
"must": Array [ | ||
Object { | ||
"bool": Object { | ||
"should": Array [ | ||
Object { | ||
"range": Object { | ||
"visualize.stars": Object { | ||
"gt": 3, | ||
"gte": undefined, | ||
"lt": undefined, | ||
"lte": undefined, | ||
}, | ||
}, | ||
}, | ||
Object { | ||
"range": Object { | ||
"dashboard.stars": Object { | ||
"gt": 3, | ||
"gte": undefined, | ||
"lt": undefined, | ||
"lte": undefined, | ||
}, | ||
}, | ||
}, | ||
], | ||
}, | ||
}, | ||
Object { | ||
"bool": Object { | ||
"should": Array [ | ||
Object { | ||
"range": Object { | ||
"visualize.followers": Object { | ||
"gt": undefined, | ||
"gte": undefined, | ||
"lt": undefined, | ||
"lte": 5, | ||
}, | ||
}, | ||
}, | ||
Object { | ||
"range": Object { | ||
"dashboard.followers": Object { | ||
"gt": undefined, | ||
"gte": undefined, | ||
"lt": undefined, | ||
"lte": 5, | ||
}, | ||
}, | ||
}, | ||
], | ||
}, | ||
}, | ||
Object { | ||
"bool": Object { | ||
"should": Array [ | ||
Object { | ||
"range": Object { | ||
"visualize.created": Object { | ||
"gt": undefined, | ||
"gte": 2018-03-02T07:00:00.000Z, | ||
"lt": 2018-03-03T07:00:00.000Z, | ||
"lte": undefined, | ||
}, | ||
}, | ||
}, | ||
Object { | ||
"range": Object { | ||
"dashboard.created": Object { | ||
"gt": undefined, | ||
"gte": 2018-03-02T07:00:00.000Z, | ||
"lt": 2018-03-03T07:00:00.000Z, | ||
"lte": undefined, | ||
}, | ||
}, | ||
}, | ||
], | ||
}, | ||
}, | ||
Object { | ||
"bool": Object { | ||
"should": Array [ | ||
Object { | ||
"range": Object { | ||
"visualize.created": Object { | ||
"gt": undefined, | ||
"gte": 2018-02-25T07:00:00.000Z, | ||
"lt": 2018-03-01T07:00:00.000Z, | ||
"lte": undefined, | ||
}, | ||
}, | ||
}, | ||
Object { | ||
"range": Object { | ||
"dashboard.created": Object { | ||
"gt": undefined, | ||
"gte": 2018-02-25T07:00:00.000Z, | ||
"lt": 2018-03-01T07:00:00.000Z, | ||
"lte": undefined, | ||
}, | ||
}, | ||
}, | ||
], | ||
}, | ||
}, | ||
Object { | ||
"bool": Object { | ||
"should": Array [ | ||
Object { | ||
"range": Object { | ||
"visualize.created": Object { | ||
"gt": undefined, | ||
"gte": undefined, | ||
"lt": 2012-01-01T07:00:00.000Z, | ||
"lte": undefined, | ||
}, | ||
}, | ||
}, | ||
Object { | ||
"range": Object { | ||
"dashboard.created": Object { | ||
"gt": undefined, | ||
"gte": undefined, | ||
"lt": 2012-01-01T07:00:00.000Z, | ||
"lte": undefined, | ||
}, | ||
}, | ||
}, | ||
], | ||
}, | ||
}, | ||
Object { | ||
"multi_match": Object { | ||
"fields": undefined, | ||
"query": "dashboard", | ||
"type": "phrase", | ||
}, | ||
}, | ||
Object { | ||
"multi_match": Object { | ||
"fields": Array [ | ||
"visualize.active", | ||
"dashboard.active", | ||
], | ||
"query": true, | ||
"type": "phrase", | ||
}, | ||
}, | ||
Object { | ||
"bool": Object { | ||
"must": Array [], | ||
"must_not": Array [], | ||
"should": Array [ | ||
Object { | ||
"bool": Object { | ||
"should": Array [ | ||
Object { | ||
"range": Object { | ||
"visualize.created": Object { | ||
"gt": undefined, | ||
"gte": 2018-03-02T07:00:00.000Z, | ||
"lt": 2018-03-03T07:00:00.000Z, | ||
"lte": undefined, | ||
}, | ||
}, | ||
}, | ||
Object { | ||
"range": Object { | ||
"dashboard.created": Object { | ||
"gt": undefined, | ||
"gte": 2018-03-02T07:00:00.000Z, | ||
"lt": 2018-03-03T07:00:00.000Z, | ||
"lte": undefined, | ||
}, | ||
}, | ||
}, | ||
], | ||
}, | ||
}, | ||
Object { | ||
"bool": Object { | ||
"should": Array [ | ||
Object { | ||
"range": Object { | ||
"visualize.created": Object { | ||
"gt": undefined, | ||
"gte": 2018-03-01T07:00:00.000Z, | ||
"lt": 2018-03-02T07:00:00.000Z, | ||
"lte": undefined, | ||
}, | ||
}, | ||
}, | ||
Object { | ||
"range": Object { | ||
"dashboard.created": Object { | ||
"gt": undefined, | ||
"gte": 2018-03-01T07:00:00.000Z, | ||
"lt": 2018-03-02T07:00:00.000Z, | ||
"lte": undefined, | ||
}, | ||
}, | ||
}, | ||
], | ||
}, | ||
}, | ||
], | ||
}, | ||
}, | ||
], | ||
"must_not": Array [ | ||
Object { | ||
"multi_match": Object { | ||
"fields": Array [ | ||
"visualize.status", | ||
"dashboard.status", | ||
], | ||
"query": "open", | ||
"type": "phrase", | ||
}, | ||
}, | ||
Object { | ||
"multi_match": Object { | ||
"fields": Array [ | ||
"visualize.owner", | ||
"dashboard.owner", | ||
], | ||
"query": "dewey", | ||
"type": "phrase", | ||
}, | ||
}, | ||
Object { | ||
"bool": Object { | ||
"must": Array [], | ||
"must_not": Array [], | ||
"should": Array [ | ||
Object { | ||
"multi_match": Object { | ||
"fields": Array [ | ||
"visualize.tag", | ||
"dashboard.tag", | ||
], | ||
"query": "finance", | ||
"type": "phrase", | ||
}, | ||
}, | ||
Object { | ||
"multi_match": Object { | ||
"fields": Array [ | ||
"visualize.tag", | ||
"dashboard.tag", | ||
], | ||
"query": "eng", | ||
"type": "phrase", | ||
}, | ||
}, | ||
Object { | ||
"multi_match": Object { | ||
"fields": Array [ | ||
"visualize.tag", | ||
"dashboard.tag", | ||
], | ||
"query": "ga", | ||
"type": "phrase", | ||
}, | ||
}, | ||
], | ||
}, | ||
}, | ||
], | ||
"should": Array [], | ||
}, | ||
} | ||
`; |
Oops, something went wrong.