mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[KQL] Remove Lucene syntax warnings (#93619)
* [KQL] Remove Lucene syntax warnings * Remove unused translations * Update docs
This commit is contained in:
parent
67ecc2051a
commit
0298f4f60a
13 changed files with 574 additions and 2287 deletions
|
@ -23950,37 +23950,6 @@
|
|||
"returnComment": [],
|
||||
"initialIsOpen": false
|
||||
},
|
||||
{
|
||||
"id": "def-common.doesKueryExpressionHaveLuceneSyntaxError",
|
||||
"type": "Function",
|
||||
"children": [
|
||||
{
|
||||
"type": "Any",
|
||||
"label": "expression",
|
||||
"isRequired": true,
|
||||
"signature": [
|
||||
"any"
|
||||
],
|
||||
"description": [],
|
||||
"source": {
|
||||
"path": "src/plugins/data/common/es_query/kuery/ast/ast.ts",
|
||||
"lineNumber": 60
|
||||
}
|
||||
}
|
||||
],
|
||||
"signature": [
|
||||
"(expression: any) => boolean"
|
||||
],
|
||||
"description": [],
|
||||
"label": "doesKueryExpressionHaveLuceneSyntaxError",
|
||||
"source": {
|
||||
"path": "src/plugins/data/common/es_query/kuery/ast/ast.ts",
|
||||
"lineNumber": 59
|
||||
},
|
||||
"tags": [],
|
||||
"returnComment": [],
|
||||
"initialIsOpen": false
|
||||
},
|
||||
{
|
||||
"id": "def-common.enableFilter",
|
||||
"type": "Function",
|
||||
|
@ -25761,7 +25730,7 @@
|
|||
"description": [],
|
||||
"source": {
|
||||
"path": "src/plugins/data/common/es_query/kuery/ast/ast.ts",
|
||||
"lineNumber": 78
|
||||
"lineNumber": 67
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -25781,7 +25750,7 @@
|
|||
"description": [],
|
||||
"source": {
|
||||
"path": "src/plugins/data/common/es_query/kuery/ast/ast.ts",
|
||||
"lineNumber": 79
|
||||
"lineNumber": 68
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -25794,7 +25763,7 @@
|
|||
"description": [],
|
||||
"source": {
|
||||
"path": "src/plugins/data/common/es_query/kuery/ast/ast.ts",
|
||||
"lineNumber": 80
|
||||
"lineNumber": 69
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -25807,7 +25776,7 @@
|
|||
"description": [],
|
||||
"source": {
|
||||
"path": "src/plugins/data/common/es_query/kuery/ast/ast.ts",
|
||||
"lineNumber": 81
|
||||
"lineNumber": 70
|
||||
}
|
||||
}
|
||||
],
|
||||
|
@ -25841,7 +25810,7 @@
|
|||
"label": "toElasticsearchQuery",
|
||||
"source": {
|
||||
"path": "src/plugins/data/common/es_query/kuery/ast/ast.ts",
|
||||
"lineNumber": 77
|
||||
"lineNumber": 66
|
||||
},
|
||||
"tags": [
|
||||
"params"
|
||||
|
@ -26395,17 +26364,6 @@
|
|||
"lineNumber": 23
|
||||
}
|
||||
},
|
||||
{
|
||||
"tags": [],
|
||||
"id": "def-common.KueryParseOptions.errorOnLuceneSyntax",
|
||||
"type": "boolean",
|
||||
"label": "errorOnLuceneSyntax",
|
||||
"description": [],
|
||||
"source": {
|
||||
"path": "src/plugins/data/common/es_query/kuery/types.ts",
|
||||
"lineNumber": 24
|
||||
}
|
||||
},
|
||||
{
|
||||
"tags": [],
|
||||
"id": "def-common.KueryParseOptions.cursorSymbol",
|
||||
|
@ -26414,7 +26372,7 @@
|
|||
"description": [],
|
||||
"source": {
|
||||
"path": "src/plugins/data/common/es_query/kuery/types.ts",
|
||||
"lineNumber": 25
|
||||
"lineNumber": 24
|
||||
},
|
||||
"signature": [
|
||||
"string | undefined"
|
||||
|
@ -26428,7 +26386,7 @@
|
|||
"description": [],
|
||||
"source": {
|
||||
"path": "src/plugins/data/common/es_query/kuery/types.ts",
|
||||
"lineNumber": 26
|
||||
"lineNumber": 25
|
||||
},
|
||||
"signature": [
|
||||
"boolean | undefined"
|
||||
|
|
|
@ -546,7 +546,7 @@
|
|||
"description": [],
|
||||
"source": {
|
||||
"path": "x-pack/plugins/ml/common/types/modules.ts",
|
||||
"lineNumber": 80
|
||||
"lineNumber": 94
|
||||
},
|
||||
"signature": [
|
||||
{
|
||||
|
@ -567,7 +567,7 @@
|
|||
"description": [],
|
||||
"source": {
|
||||
"path": "x-pack/plugins/ml/common/types/modules.ts",
|
||||
"lineNumber": 81
|
||||
"lineNumber": 95
|
||||
},
|
||||
"signature": [
|
||||
{
|
||||
|
@ -588,7 +588,7 @@
|
|||
"description": [],
|
||||
"source": {
|
||||
"path": "x-pack/plugins/ml/common/types/modules.ts",
|
||||
"lineNumber": 82
|
||||
"lineNumber": 96
|
||||
},
|
||||
"signature": [
|
||||
"{ search: ",
|
||||
|
@ -621,7 +621,7 @@
|
|||
],
|
||||
"source": {
|
||||
"path": "x-pack/plugins/ml/common/types/modules.ts",
|
||||
"lineNumber": 79
|
||||
"lineNumber": 93
|
||||
},
|
||||
"initialIsOpen": false
|
||||
},
|
||||
|
|
|
@ -220,11 +220,11 @@
|
|||
{
|
||||
"id": "def-public.SavedObjectLoader",
|
||||
"type": "Class",
|
||||
"tags": [],
|
||||
"label": "SavedObjectLoader",
|
||||
"description": [
|
||||
"\nThe SavedObjectLoader class provides some convenience functions\nto load and save one kind of saved objects (specified in the constructor).\n\nIt is based on the SavedObjectClient which implements loading and saving\nin an abstract, type-agnostic way. If possible, use SavedObjectClient directly\nto avoid pulling in extra functionality which isn't used."
|
||||
"tags": [
|
||||
"deprecated"
|
||||
],
|
||||
"label": "SavedObjectLoader",
|
||||
"description": [],
|
||||
"children": [
|
||||
{
|
||||
"tags": [],
|
||||
|
@ -234,7 +234,7 @@
|
|||
"description": [],
|
||||
"source": {
|
||||
"path": "src/plugins/saved_objects/public/saved_object/saved_object_loader.ts",
|
||||
"lineNumber": 34
|
||||
"lineNumber": 35
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -245,7 +245,7 @@
|
|||
"description": [],
|
||||
"source": {
|
||||
"path": "src/plugins/saved_objects/public/saved_object/saved_object_loader.ts",
|
||||
"lineNumber": 35
|
||||
"lineNumber": 36
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -256,7 +256,7 @@
|
|||
"description": [],
|
||||
"source": {
|
||||
"path": "src/plugins/saved_objects/public/saved_object/saved_object_loader.ts",
|
||||
"lineNumber": 36
|
||||
"lineNumber": 37
|
||||
},
|
||||
"signature": [
|
||||
"Record<string, string>"
|
||||
|
@ -281,7 +281,7 @@
|
|||
"description": [],
|
||||
"source": {
|
||||
"path": "src/plugins/saved_objects/public/saved_object/saved_object_loader.ts",
|
||||
"lineNumber": 39
|
||||
"lineNumber": 40
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -302,7 +302,7 @@
|
|||
"description": [],
|
||||
"source": {
|
||||
"path": "src/plugins/saved_objects/public/saved_object/saved_object_loader.ts",
|
||||
"lineNumber": 40
|
||||
"lineNumber": 41
|
||||
}
|
||||
}
|
||||
],
|
||||
|
@ -310,7 +310,7 @@
|
|||
"returnComment": [],
|
||||
"source": {
|
||||
"path": "src/plugins/saved_objects/public/saved_object/saved_object_loader.ts",
|
||||
"lineNumber": 38
|
||||
"lineNumber": 39
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -334,7 +334,7 @@
|
|||
"description": [],
|
||||
"source": {
|
||||
"path": "src/plugins/saved_objects/public/saved_object/saved_object_loader.ts",
|
||||
"lineNumber": 60
|
||||
"lineNumber": 61
|
||||
}
|
||||
}
|
||||
],
|
||||
|
@ -342,7 +342,7 @@
|
|||
"returnComment": [],
|
||||
"source": {
|
||||
"path": "src/plugins/saved_objects/public/saved_object/saved_object_loader.ts",
|
||||
"lineNumber": 60
|
||||
"lineNumber": 61
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -364,7 +364,7 @@
|
|||
"description": [],
|
||||
"source": {
|
||||
"path": "src/plugins/saved_objects/public/saved_object/saved_object_loader.ts",
|
||||
"lineNumber": 68
|
||||
"lineNumber": 69
|
||||
}
|
||||
}
|
||||
],
|
||||
|
@ -372,7 +372,7 @@
|
|||
"returnComment": [],
|
||||
"source": {
|
||||
"path": "src/plugins/saved_objects/public/saved_object/saved_object_loader.ts",
|
||||
"lineNumber": 68
|
||||
"lineNumber": 69
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -394,7 +394,7 @@
|
|||
"description": [],
|
||||
"source": {
|
||||
"path": "src/plugins/saved_objects/public/saved_object/saved_object_loader.ts",
|
||||
"lineNumber": 72
|
||||
"lineNumber": 73
|
||||
}
|
||||
}
|
||||
],
|
||||
|
@ -402,7 +402,7 @@
|
|||
"returnComment": [],
|
||||
"source": {
|
||||
"path": "src/plugins/saved_objects/public/saved_object/saved_object_loader.ts",
|
||||
"lineNumber": 72
|
||||
"lineNumber": 73
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -434,7 +434,7 @@
|
|||
"description": [],
|
||||
"source": {
|
||||
"path": "src/plugins/saved_objects/public/saved_object/saved_object_loader.ts",
|
||||
"lineNumber": 92
|
||||
"lineNumber": 93
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -447,7 +447,7 @@
|
|||
"description": [],
|
||||
"source": {
|
||||
"path": "src/plugins/saved_objects/public/saved_object/saved_object_loader.ts",
|
||||
"lineNumber": 93
|
||||
"lineNumber": 94
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -467,7 +467,7 @@
|
|||
"description": [],
|
||||
"source": {
|
||||
"path": "src/plugins/saved_objects/public/saved_object/saved_object_loader.ts",
|
||||
"lineNumber": 94
|
||||
"lineNumber": 95
|
||||
}
|
||||
}
|
||||
],
|
||||
|
@ -477,7 +477,7 @@
|
|||
],
|
||||
"source": {
|
||||
"path": "src/plugins/saved_objects/public/saved_object/saved_object_loader.ts",
|
||||
"lineNumber": 91
|
||||
"lineNumber": 92
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -514,7 +514,7 @@
|
|||
"description": [],
|
||||
"source": {
|
||||
"path": "src/plugins/saved_objects/public/saved_object/saved_object_loader.ts",
|
||||
"lineNumber": 113
|
||||
"lineNumber": 114
|
||||
},
|
||||
"signature": [
|
||||
"Record<string, unknown>"
|
||||
|
@ -528,7 +528,7 @@
|
|||
"description": [],
|
||||
"source": {
|
||||
"path": "src/plugins/saved_objects/public/saved_object/saved_object_loader.ts",
|
||||
"lineNumber": 114
|
||||
"lineNumber": 115
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -539,7 +539,7 @@
|
|||
"description": [],
|
||||
"source": {
|
||||
"path": "src/plugins/saved_objects/public/saved_object/saved_object_loader.ts",
|
||||
"lineNumber": 115
|
||||
"lineNumber": 116
|
||||
},
|
||||
"signature": [
|
||||
{
|
||||
|
@ -555,7 +555,7 @@
|
|||
],
|
||||
"source": {
|
||||
"path": "src/plugins/saved_objects/public/saved_object/saved_object_loader.ts",
|
||||
"lineNumber": 112
|
||||
"lineNumber": 113
|
||||
}
|
||||
}
|
||||
],
|
||||
|
@ -565,7 +565,7 @@
|
|||
],
|
||||
"source": {
|
||||
"path": "src/plugins/saved_objects/public/saved_object/saved_object_loader.ts",
|
||||
"lineNumber": 108
|
||||
"lineNumber": 109
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -595,7 +595,7 @@
|
|||
"description": [],
|
||||
"source": {
|
||||
"path": "src/plugins/saved_objects/public/saved_object/saved_object_loader.ts",
|
||||
"lineNumber": 152
|
||||
"lineNumber": 153
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -615,7 +615,7 @@
|
|||
"description": [],
|
||||
"source": {
|
||||
"path": "src/plugins/saved_objects/public/saved_object/saved_object_loader.ts",
|
||||
"lineNumber": 152
|
||||
"lineNumber": 153
|
||||
}
|
||||
}
|
||||
],
|
||||
|
@ -623,20 +623,22 @@
|
|||
"returnComment": [],
|
||||
"source": {
|
||||
"path": "src/plugins/saved_objects/public/saved_object/saved_object_loader.ts",
|
||||
"lineNumber": 152
|
||||
"lineNumber": 153
|
||||
}
|
||||
}
|
||||
],
|
||||
"source": {
|
||||
"path": "src/plugins/saved_objects/public/saved_object/saved_object_loader.ts",
|
||||
"lineNumber": 32
|
||||
"lineNumber": 33
|
||||
},
|
||||
"initialIsOpen": false
|
||||
},
|
||||
{
|
||||
"id": "def-public.SavedObjectSaveModal",
|
||||
"type": "Class",
|
||||
"tags": [],
|
||||
"tags": [
|
||||
"deprecated"
|
||||
],
|
||||
"label": "SavedObjectSaveModal",
|
||||
"description": [],
|
||||
"signature": [
|
||||
|
@ -671,7 +673,7 @@
|
|||
"description": [],
|
||||
"source": {
|
||||
"path": "src/plugins/saved_objects/public/save_modal/saved_object_save_modal.tsx",
|
||||
"lineNumber": 72
|
||||
"lineNumber": 73
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -682,7 +684,7 @@
|
|||
"description": [],
|
||||
"source": {
|
||||
"path": "src/plugins/saved_objects/public/save_modal/saved_object_save_modal.tsx",
|
||||
"lineNumber": 73
|
||||
"lineNumber": 74
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -693,7 +695,7 @@
|
|||
"description": [],
|
||||
"source": {
|
||||
"path": "src/plugins/saved_objects/public/save_modal/saved_object_save_modal.tsx",
|
||||
"lineNumber": 74
|
||||
"lineNumber": 75
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -704,7 +706,7 @@
|
|||
"description": [],
|
||||
"source": {
|
||||
"path": "src/plugins/saved_objects/public/save_modal/saved_object_save_modal.tsx",
|
||||
"lineNumber": 75
|
||||
"lineNumber": 76
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -715,7 +717,7 @@
|
|||
"description": [],
|
||||
"source": {
|
||||
"path": "src/plugins/saved_objects/public/save_modal/saved_object_save_modal.tsx",
|
||||
"lineNumber": 76
|
||||
"lineNumber": 77
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -726,7 +728,7 @@
|
|||
"description": [],
|
||||
"source": {
|
||||
"path": "src/plugins/saved_objects/public/save_modal/saved_object_save_modal.tsx",
|
||||
"lineNumber": 77
|
||||
"lineNumber": 78
|
||||
}
|
||||
}
|
||||
],
|
||||
|
@ -734,7 +736,7 @@
|
|||
"label": "state",
|
||||
"source": {
|
||||
"path": "src/plugins/saved_objects/public/save_modal/saved_object_save_modal.tsx",
|
||||
"lineNumber": 71
|
||||
"lineNumber": 72
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -750,13 +752,13 @@
|
|||
"returnComment": [],
|
||||
"source": {
|
||||
"path": "src/plugins/saved_objects/public/save_modal/saved_object_save_modal.tsx",
|
||||
"lineNumber": 80
|
||||
"lineNumber": 81
|
||||
}
|
||||
}
|
||||
],
|
||||
"source": {
|
||||
"path": "src/plugins/saved_objects/public/save_modal/saved_object_save_modal.tsx",
|
||||
"lineNumber": 69
|
||||
"lineNumber": 70
|
||||
},
|
||||
"initialIsOpen": false
|
||||
}
|
||||
|
@ -1517,7 +1519,9 @@
|
|||
"type": "Interface",
|
||||
"label": "SavedObject",
|
||||
"description": [],
|
||||
"tags": [],
|
||||
"tags": [
|
||||
"deprecated"
|
||||
],
|
||||
"children": [
|
||||
{
|
||||
"tags": [],
|
||||
|
@ -1527,7 +1531,7 @@
|
|||
"description": [],
|
||||
"source": {
|
||||
"path": "src/plugins/saved_objects/public/types.ts",
|
||||
"lineNumber": 25
|
||||
"lineNumber": 26
|
||||
},
|
||||
"signature": [
|
||||
"() => { attributes: ",
|
||||
|
@ -1557,7 +1561,7 @@
|
|||
"description": [],
|
||||
"source": {
|
||||
"path": "src/plugins/saved_objects/public/types.ts",
|
||||
"lineNumber": 26
|
||||
"lineNumber": 27
|
||||
},
|
||||
"signature": [
|
||||
"Record<string, unknown>"
|
||||
|
@ -1571,7 +1575,7 @@
|
|||
"description": [],
|
||||
"source": {
|
||||
"path": "src/plugins/saved_objects/public/types.ts",
|
||||
"lineNumber": 27
|
||||
"lineNumber": 28
|
||||
},
|
||||
"signature": [
|
||||
"(resp: Record<string, any>) => Promise<",
|
||||
|
@ -1593,7 +1597,7 @@
|
|||
"description": [],
|
||||
"source": {
|
||||
"path": "src/plugins/saved_objects/public/types.ts",
|
||||
"lineNumber": 28
|
||||
"lineNumber": 29
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -1604,7 +1608,7 @@
|
|||
"description": [],
|
||||
"source": {
|
||||
"path": "src/plugins/saved_objects/public/types.ts",
|
||||
"lineNumber": 29
|
||||
"lineNumber": 30
|
||||
},
|
||||
"signature": [
|
||||
"(opts: ",
|
||||
|
@ -1626,7 +1630,7 @@
|
|||
"description": [],
|
||||
"source": {
|
||||
"path": "src/plugins/saved_objects/public/types.ts",
|
||||
"lineNumber": 30
|
||||
"lineNumber": 31
|
||||
},
|
||||
"signature": [
|
||||
"any"
|
||||
|
@ -1640,7 +1644,7 @@
|
|||
"description": [],
|
||||
"source": {
|
||||
"path": "src/plugins/saved_objects/public/types.ts",
|
||||
"lineNumber": 31
|
||||
"lineNumber": 32
|
||||
},
|
||||
"signature": [
|
||||
"(() => Promise<{}>) | undefined"
|
||||
|
@ -1654,7 +1658,7 @@
|
|||
"description": [],
|
||||
"source": {
|
||||
"path": "src/plugins/saved_objects/public/types.ts",
|
||||
"lineNumber": 32
|
||||
"lineNumber": 33
|
||||
},
|
||||
"signature": [
|
||||
"() => void"
|
||||
|
@ -1668,7 +1672,7 @@
|
|||
"description": [],
|
||||
"source": {
|
||||
"path": "src/plugins/saved_objects/public/types.ts",
|
||||
"lineNumber": 33
|
||||
"lineNumber": 34
|
||||
},
|
||||
"signature": [
|
||||
"() => string"
|
||||
|
@ -1682,7 +1686,7 @@
|
|||
"description": [],
|
||||
"source": {
|
||||
"path": "src/plugins/saved_objects/public/types.ts",
|
||||
"lineNumber": 34
|
||||
"lineNumber": 35
|
||||
},
|
||||
"signature": [
|
||||
"() => string"
|
||||
|
@ -1696,7 +1700,7 @@
|
|||
"description": [],
|
||||
"source": {
|
||||
"path": "src/plugins/saved_objects/public/types.ts",
|
||||
"lineNumber": 35
|
||||
"lineNumber": 36
|
||||
},
|
||||
"signature": [
|
||||
"() => string"
|
||||
|
@ -1710,7 +1714,7 @@
|
|||
"description": [],
|
||||
"source": {
|
||||
"path": "src/plugins/saved_objects/public/types.ts",
|
||||
"lineNumber": 36
|
||||
"lineNumber": 37
|
||||
},
|
||||
"signature": [
|
||||
"((id?: string | undefined) => Promise<",
|
||||
|
@ -1732,7 +1736,7 @@
|
|||
"description": [],
|
||||
"source": {
|
||||
"path": "src/plugins/saved_objects/public/types.ts",
|
||||
"lineNumber": 37
|
||||
"lineNumber": 38
|
||||
},
|
||||
"signature": [
|
||||
"string | undefined"
|
||||
|
@ -1746,7 +1750,7 @@
|
|||
"description": [],
|
||||
"source": {
|
||||
"path": "src/plugins/saved_objects/public/types.ts",
|
||||
"lineNumber": 38
|
||||
"lineNumber": 39
|
||||
},
|
||||
"signature": [
|
||||
"(() => Promise<",
|
||||
|
@ -1768,7 +1772,7 @@
|
|||
"description": [],
|
||||
"source": {
|
||||
"path": "src/plugins/saved_objects/public/types.ts",
|
||||
"lineNumber": 39
|
||||
"lineNumber": 40
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -1779,7 +1783,7 @@
|
|||
"description": [],
|
||||
"source": {
|
||||
"path": "src/plugins/saved_objects/public/types.ts",
|
||||
"lineNumber": 40
|
||||
"lineNumber": 41
|
||||
},
|
||||
"signature": [
|
||||
"() => boolean"
|
||||
|
@ -1793,7 +1797,7 @@
|
|||
"description": [],
|
||||
"source": {
|
||||
"path": "src/plugins/saved_objects/public/types.ts",
|
||||
"lineNumber": 41
|
||||
"lineNumber": 42
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -1804,7 +1808,7 @@
|
|||
"description": [],
|
||||
"source": {
|
||||
"path": "src/plugins/saved_objects/public/types.ts",
|
||||
"lineNumber": 42
|
||||
"lineNumber": 43
|
||||
},
|
||||
"signature": [
|
||||
"Record<string, any> | undefined"
|
||||
|
@ -1818,7 +1822,7 @@
|
|||
"description": [],
|
||||
"source": {
|
||||
"path": "src/plugins/saved_objects/public/types.ts",
|
||||
"lineNumber": 43
|
||||
"lineNumber": 44
|
||||
},
|
||||
"signature": [
|
||||
"(saveOptions: ",
|
||||
|
@ -1840,7 +1844,7 @@
|
|||
"description": [],
|
||||
"source": {
|
||||
"path": "src/plugins/saved_objects/public/types.ts",
|
||||
"lineNumber": 44
|
||||
"lineNumber": 45
|
||||
},
|
||||
"signature": [
|
||||
"Pick<",
|
||||
|
@ -1862,7 +1866,7 @@
|
|||
"description": [],
|
||||
"source": {
|
||||
"path": "src/plugins/saved_objects/public/types.ts",
|
||||
"lineNumber": 45
|
||||
"lineNumber": 46
|
||||
},
|
||||
"signature": [
|
||||
{
|
||||
|
@ -1883,7 +1887,7 @@
|
|||
"description": [],
|
||||
"source": {
|
||||
"path": "src/plugins/saved_objects/public/types.ts",
|
||||
"lineNumber": 46
|
||||
"lineNumber": 47
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -1894,7 +1898,7 @@
|
|||
"description": [],
|
||||
"source": {
|
||||
"path": "src/plugins/saved_objects/public/types.ts",
|
||||
"lineNumber": 47
|
||||
"lineNumber": 48
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -1905,7 +1909,7 @@
|
|||
"description": [],
|
||||
"source": {
|
||||
"path": "src/plugins/saved_objects/public/types.ts",
|
||||
"lineNumber": 48
|
||||
"lineNumber": 49
|
||||
},
|
||||
"signature": [
|
||||
{
|
||||
|
@ -1921,7 +1925,7 @@
|
|||
],
|
||||
"source": {
|
||||
"path": "src/plugins/saved_objects/public/types.ts",
|
||||
"lineNumber": 24
|
||||
"lineNumber": 25
|
||||
},
|
||||
"initialIsOpen": false
|
||||
},
|
||||
|
@ -1940,7 +1944,7 @@
|
|||
"description": [],
|
||||
"source": {
|
||||
"path": "src/plugins/saved_objects/public/types.ts",
|
||||
"lineNumber": 78
|
||||
"lineNumber": 79
|
||||
},
|
||||
"signature": [
|
||||
"((savedObject: ",
|
||||
|
@ -1970,7 +1974,7 @@
|
|||
"description": [],
|
||||
"source": {
|
||||
"path": "src/plugins/saved_objects/public/types.ts",
|
||||
"lineNumber": 79
|
||||
"lineNumber": 80
|
||||
},
|
||||
"signature": [
|
||||
"any"
|
||||
|
@ -1984,7 +1988,7 @@
|
|||
"description": [],
|
||||
"source": {
|
||||
"path": "src/plugins/saved_objects/public/types.ts",
|
||||
"lineNumber": 80
|
||||
"lineNumber": 81
|
||||
},
|
||||
"signature": [
|
||||
"((opts: ",
|
||||
|
@ -2014,7 +2018,7 @@
|
|||
"description": [],
|
||||
"source": {
|
||||
"path": "src/plugins/saved_objects/public/types.ts",
|
||||
"lineNumber": 81
|
||||
"lineNumber": 82
|
||||
},
|
||||
"signature": [
|
||||
"(<T extends ",
|
||||
|
@ -2044,7 +2048,7 @@
|
|||
"description": [],
|
||||
"source": {
|
||||
"path": "src/plugins/saved_objects/public/types.ts",
|
||||
"lineNumber": 82
|
||||
"lineNumber": 83
|
||||
},
|
||||
"signature": [
|
||||
"string | undefined"
|
||||
|
@ -2058,7 +2062,7 @@
|
|||
"description": [],
|
||||
"source": {
|
||||
"path": "src/plugins/saved_objects/public/types.ts",
|
||||
"lineNumber": 83
|
||||
"lineNumber": 84
|
||||
},
|
||||
"signature": [
|
||||
"(() => void) | undefined"
|
||||
|
@ -2072,7 +2076,7 @@
|
|||
"description": [],
|
||||
"source": {
|
||||
"path": "src/plugins/saved_objects/public/types.ts",
|
||||
"lineNumber": 84
|
||||
"lineNumber": 85
|
||||
},
|
||||
"signature": [
|
||||
{
|
||||
|
@ -2093,7 +2097,7 @@
|
|||
"description": [],
|
||||
"source": {
|
||||
"path": "src/plugins/saved_objects/public/types.ts",
|
||||
"lineNumber": 85
|
||||
"lineNumber": 86
|
||||
},
|
||||
"signature": [
|
||||
"Record<string, any> | undefined"
|
||||
|
@ -2107,7 +2111,7 @@
|
|||
"description": [],
|
||||
"source": {
|
||||
"path": "src/plugins/saved_objects/public/types.ts",
|
||||
"lineNumber": 86
|
||||
"lineNumber": 87
|
||||
},
|
||||
"signature": [
|
||||
"Record<string, any> | undefined"
|
||||
|
@ -2121,7 +2125,7 @@
|
|||
"description": [],
|
||||
"source": {
|
||||
"path": "src/plugins/saved_objects/public/types.ts",
|
||||
"lineNumber": 87
|
||||
"lineNumber": 88
|
||||
},
|
||||
"signature": [
|
||||
"string | undefined"
|
||||
|
@ -2135,7 +2139,7 @@
|
|||
"description": [],
|
||||
"source": {
|
||||
"path": "src/plugins/saved_objects/public/types.ts",
|
||||
"lineNumber": 88
|
||||
"lineNumber": 89
|
||||
},
|
||||
"signature": [
|
||||
"boolean | Pick<",
|
||||
|
@ -2157,7 +2161,7 @@
|
|||
"description": [],
|
||||
"source": {
|
||||
"path": "src/plugins/saved_objects/public/types.ts",
|
||||
"lineNumber": 89
|
||||
"lineNumber": 90
|
||||
},
|
||||
"signature": [
|
||||
"string | undefined"
|
||||
|
@ -2166,7 +2170,7 @@
|
|||
],
|
||||
"source": {
|
||||
"path": "src/plugins/saved_objects/public/types.ts",
|
||||
"lineNumber": 76
|
||||
"lineNumber": 77
|
||||
},
|
||||
"initialIsOpen": false
|
||||
},
|
||||
|
@ -2599,7 +2603,7 @@
|
|||
"description": [],
|
||||
"source": {
|
||||
"path": "src/plugins/saved_objects/public/types.ts",
|
||||
"lineNumber": 52
|
||||
"lineNumber": 53
|
||||
},
|
||||
"signature": [
|
||||
"boolean | undefined"
|
||||
|
@ -2613,7 +2617,7 @@
|
|||
"description": [],
|
||||
"source": {
|
||||
"path": "src/plugins/saved_objects/public/types.ts",
|
||||
"lineNumber": 53
|
||||
"lineNumber": 54
|
||||
},
|
||||
"signature": [
|
||||
"boolean | undefined"
|
||||
|
@ -2627,7 +2631,7 @@
|
|||
"description": [],
|
||||
"source": {
|
||||
"path": "src/plugins/saved_objects/public/types.ts",
|
||||
"lineNumber": 54
|
||||
"lineNumber": 55
|
||||
},
|
||||
"signature": [
|
||||
"(() => void) | undefined"
|
||||
|
@ -2641,7 +2645,7 @@
|
|||
"description": [],
|
||||
"source": {
|
||||
"path": "src/plugins/saved_objects/public/types.ts",
|
||||
"lineNumber": 55
|
||||
"lineNumber": 56
|
||||
},
|
||||
"signature": [
|
||||
"boolean | undefined"
|
||||
|
@ -2650,7 +2654,7 @@
|
|||
],
|
||||
"source": {
|
||||
"path": "src/plugins/saved_objects/public/types.ts",
|
||||
"lineNumber": 51
|
||||
"lineNumber": 52
|
||||
},
|
||||
"initialIsOpen": false
|
||||
},
|
||||
|
@ -2819,14 +2823,16 @@
|
|||
"tags": [],
|
||||
"children": [
|
||||
{
|
||||
"tags": [],
|
||||
"tags": [
|
||||
"deprecated"
|
||||
],
|
||||
"id": "def-public.SavedObjectsStart.SavedObjectClass",
|
||||
"type": "Object",
|
||||
"label": "SavedObjectClass",
|
||||
"description": [],
|
||||
"source": {
|
||||
"path": "src/plugins/saved_objects/public/plugin.ts",
|
||||
"lineNumber": 26
|
||||
"lineNumber": 27
|
||||
},
|
||||
"signature": [
|
||||
"new (raw: Record<string, any>) => ",
|
||||
|
@ -2840,14 +2846,16 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"tags": [],
|
||||
"tags": [
|
||||
"deprecated"
|
||||
],
|
||||
"id": "def-public.SavedObjectsStart.settings",
|
||||
"type": "Object",
|
||||
"label": "settings",
|
||||
"description": [],
|
||||
"source": {
|
||||
"path": "src/plugins/saved_objects/public/plugin.ts",
|
||||
"lineNumber": 27
|
||||
"lineNumber": 29
|
||||
},
|
||||
"signature": [
|
||||
"{ getPerPage: () => number; getListingLimit: () => number; }"
|
||||
|
|
|
@ -445,6 +445,20 @@
|
|||
"signature": [
|
||||
"number | undefined"
|
||||
]
|
||||
},
|
||||
{
|
||||
"tags": [],
|
||||
"id": "def-public.UserMenuLink.setAsProfile",
|
||||
"type": "CompoundType",
|
||||
"label": "setAsProfile",
|
||||
"description": [],
|
||||
"source": {
|
||||
"path": "x-pack/plugins/security/public/nav_control/nav_control_component.tsx",
|
||||
"lineNumber": 33
|
||||
},
|
||||
"signature": [
|
||||
"boolean | undefined"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": {
|
||||
|
|
|
@ -476,7 +476,8 @@
|
|||
"docId": "kibVisualizationsPluginApi",
|
||||
"section": "def-public.SerializedVis",
|
||||
"text": "SerializedVis"
|
||||
}
|
||||
},
|
||||
"<TVisParams>"
|
||||
],
|
||||
"description": [],
|
||||
"source": {
|
||||
|
@ -505,7 +506,15 @@
|
|||
"section": "def-public.SerializedVis",
|
||||
"text": "SerializedVis"
|
||||
},
|
||||
", \"type\" | \"id\" | \"description\" | \"title\" | \"params\" | \"uiState\"> & Pick<{ data: Partial<",
|
||||
"<",
|
||||
{
|
||||
"pluginId": "visualizations",
|
||||
"scope": "common",
|
||||
"docId": "kibVisualizationsPluginApi",
|
||||
"section": "def-common.VisParams",
|
||||
"text": "VisParams"
|
||||
},
|
||||
">, \"type\" | \"id\" | \"description\" | \"title\" | \"params\" | \"uiState\"> & Pick<{ data: Partial<",
|
||||
{
|
||||
"pluginId": "visualizations",
|
||||
"scope": "public",
|
||||
|
@ -538,7 +547,15 @@
|
|||
"section": "def-public.SerializedVis",
|
||||
"text": "SerializedVis"
|
||||
},
|
||||
", \"type\" | \"id\" | \"description\" | \"title\" | \"params\" | \"uiState\"> & Pick<{ data: Partial<",
|
||||
"<",
|
||||
{
|
||||
"pluginId": "visualizations",
|
||||
"scope": "common",
|
||||
"docId": "kibVisualizationsPluginApi",
|
||||
"section": "def-common.VisParams",
|
||||
"text": "VisParams"
|
||||
},
|
||||
">, \"type\" | \"id\" | \"description\" | \"title\" | \"params\" | \"uiState\"> & Pick<{ data: Partial<",
|
||||
{
|
||||
"pluginId": "visualizations",
|
||||
"scope": "public",
|
||||
|
@ -583,15 +600,7 @@
|
|||
"section": "def-public.Vis",
|
||||
"text": "Vis"
|
||||
},
|
||||
"<",
|
||||
{
|
||||
"pluginId": "visualizations",
|
||||
"scope": "common",
|
||||
"docId": "kibVisualizationsPluginApi",
|
||||
"section": "def-common.VisParams",
|
||||
"text": "VisParams"
|
||||
},
|
||||
">"
|
||||
"<TVisParams>"
|
||||
],
|
||||
"description": [],
|
||||
"children": [],
|
||||
|
@ -614,7 +623,16 @@
|
|||
"docId": "kibVisualizationsPluginApi",
|
||||
"section": "def-public.SerializedVis",
|
||||
"text": "SerializedVis"
|
||||
}
|
||||
},
|
||||
"<",
|
||||
{
|
||||
"pluginId": "visualizations",
|
||||
"scope": "common",
|
||||
"docId": "kibVisualizationsPluginApi",
|
||||
"section": "def-common.VisParams",
|
||||
"text": "VisParams"
|
||||
},
|
||||
">"
|
||||
],
|
||||
"description": [],
|
||||
"children": [],
|
||||
|
@ -1393,6 +1411,16 @@
|
|||
"id": "def-public.SerializedVis",
|
||||
"type": "Interface",
|
||||
"label": "SerializedVis",
|
||||
"signature": [
|
||||
{
|
||||
"pluginId": "visualizations",
|
||||
"scope": "public",
|
||||
"docId": "kibVisualizationsPluginApi",
|
||||
"section": "def-public.SerializedVis",
|
||||
"text": "SerializedVis"
|
||||
},
|
||||
"<T>"
|
||||
],
|
||||
"description": [],
|
||||
"tags": [],
|
||||
"children": [
|
||||
|
@ -1449,7 +1477,7 @@
|
|||
{
|
||||
"tags": [],
|
||||
"id": "def-public.SerializedVis.params",
|
||||
"type": "Object",
|
||||
"type": "Uncategorized",
|
||||
"label": "params",
|
||||
"description": [],
|
||||
"source": {
|
||||
|
@ -1457,13 +1485,7 @@
|
|||
"lineNumber": 47
|
||||
},
|
||||
"signature": [
|
||||
{
|
||||
"pluginId": "visualizations",
|
||||
"scope": "common",
|
||||
"docId": "kibVisualizationsPluginApi",
|
||||
"section": "def-common.VisParams",
|
||||
"text": "VisParams"
|
||||
}
|
||||
"T"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -2922,7 +2944,15 @@
|
|||
"section": "def-public.SerializedVis",
|
||||
"text": "SerializedVis"
|
||||
},
|
||||
" | undefined"
|
||||
"<",
|
||||
{
|
||||
"pluginId": "visualizations",
|
||||
"scope": "common",
|
||||
"docId": "kibVisualizationsPluginApi",
|
||||
"section": "def-common.VisParams",
|
||||
"text": "VisParams"
|
||||
},
|
||||
"> | undefined"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -3213,7 +3243,15 @@
|
|||
"section": "def-public.SerializedVis",
|
||||
"text": "SerializedVis"
|
||||
},
|
||||
" | undefined; }, parent?: ",
|
||||
"<",
|
||||
{
|
||||
"pluginId": "visualizations",
|
||||
"scope": "common",
|
||||
"docId": "kibVisualizationsPluginApi",
|
||||
"section": "def-common.VisParams",
|
||||
"text": "VisParams"
|
||||
},
|
||||
"> | undefined; }, parent?: ",
|
||||
{
|
||||
"pluginId": "embeddable",
|
||||
"scope": "public",
|
||||
|
@ -3228,14 +3266,6 @@
|
|||
"docId": "kibEmbeddablePluginApi",
|
||||
"section": "def-public.ContainerInput",
|
||||
"text": "ContainerInput"
|
||||
},
|
||||
"<{}>, ",
|
||||
{
|
||||
"pluginId": "embeddable",
|
||||
"scope": "public",
|
||||
"docId": "kibEmbeddablePluginApi",
|
||||
"section": "def-public.ContainerOutput",
|
||||
"text": "ContainerOutput"
|
||||
}
|
||||
],
|
||||
"initialIsOpen": false
|
||||
|
@ -3433,7 +3463,15 @@
|
|||
"section": "def-public.SerializedVis",
|
||||
"text": "SerializedVis"
|
||||
},
|
||||
") => Promise<",
|
||||
"<",
|
||||
{
|
||||
"pluginId": "visualizations",
|
||||
"scope": "common",
|
||||
"docId": "kibVisualizationsPluginApi",
|
||||
"section": "def-common.VisParams",
|
||||
"text": "VisParams"
|
||||
},
|
||||
">) => Promise<",
|
||||
{
|
||||
"pluginId": "visualizations",
|
||||
"scope": "public",
|
||||
|
@ -3478,7 +3516,16 @@
|
|||
"docId": "kibVisualizationsPluginApi",
|
||||
"section": "def-public.SerializedVis",
|
||||
"text": "SerializedVis"
|
||||
}
|
||||
},
|
||||
"<",
|
||||
{
|
||||
"pluginId": "visualizations",
|
||||
"scope": "common",
|
||||
"docId": "kibVisualizationsPluginApi",
|
||||
"section": "def-common.VisParams",
|
||||
"text": "VisParams"
|
||||
},
|
||||
">"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -3500,7 +3547,15 @@
|
|||
"section": "def-public.SerializedVis",
|
||||
"text": "SerializedVis"
|
||||
},
|
||||
") => ",
|
||||
"<",
|
||||
{
|
||||
"pluginId": "visualizations",
|
||||
"scope": "common",
|
||||
"docId": "kibVisualizationsPluginApi",
|
||||
"section": "def-common.VisParams",
|
||||
"text": "VisParams"
|
||||
},
|
||||
">) => ",
|
||||
{
|
||||
"pluginId": "visualizations",
|
||||
"scope": "public",
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -6,12 +6,7 @@
|
|||
* Side Public License, v 1.
|
||||
*/
|
||||
|
||||
import {
|
||||
fromKueryExpression,
|
||||
fromLiteralExpression,
|
||||
toElasticsearchQuery,
|
||||
doesKueryExpressionHaveLuceneSyntaxError,
|
||||
} from './ast';
|
||||
import { fromKueryExpression, fromLiteralExpression, toElasticsearchQuery } from './ast';
|
||||
import { nodeTypes } from '../node_types';
|
||||
import { fields } from '../../../index_patterns/mocks';
|
||||
import { IIndexPattern } from '../../../index_patterns';
|
||||
|
@ -376,81 +371,4 @@ describe('kuery AST API', () => {
|
|||
expect(result).toEqual(expected);
|
||||
});
|
||||
});
|
||||
|
||||
describe('doesKueryExpressionHaveLuceneSyntaxError', () => {
|
||||
test('should return true for Lucene ranges', () => {
|
||||
const result = doesKueryExpressionHaveLuceneSyntaxError('bar: [1 TO 10]');
|
||||
expect(result).toEqual(true);
|
||||
});
|
||||
|
||||
test('should return false for KQL ranges', () => {
|
||||
const result = doesKueryExpressionHaveLuceneSyntaxError('bar < 1');
|
||||
expect(result).toEqual(false);
|
||||
});
|
||||
|
||||
test('should return true for Lucene exists', () => {
|
||||
const result = doesKueryExpressionHaveLuceneSyntaxError('_exists_: bar');
|
||||
expect(result).toEqual(true);
|
||||
});
|
||||
|
||||
test('should return false for KQL exists', () => {
|
||||
const result = doesKueryExpressionHaveLuceneSyntaxError('bar:*');
|
||||
expect(result).toEqual(false);
|
||||
});
|
||||
|
||||
test('should return true for Lucene wildcards', () => {
|
||||
const result = doesKueryExpressionHaveLuceneSyntaxError('bar: ba?');
|
||||
expect(result).toEqual(true);
|
||||
});
|
||||
|
||||
test('should return false for KQL wildcards', () => {
|
||||
const result = doesKueryExpressionHaveLuceneSyntaxError('bar: ba*');
|
||||
expect(result).toEqual(false);
|
||||
});
|
||||
|
||||
test('should return true for Lucene regex', () => {
|
||||
const result = doesKueryExpressionHaveLuceneSyntaxError('bar: /ba.*/');
|
||||
expect(result).toEqual(true);
|
||||
});
|
||||
|
||||
test('should return true for Lucene fuzziness', () => {
|
||||
const result = doesKueryExpressionHaveLuceneSyntaxError('bar: ba~');
|
||||
expect(result).toEqual(true);
|
||||
});
|
||||
|
||||
test('should return true for Lucene proximity', () => {
|
||||
const result = doesKueryExpressionHaveLuceneSyntaxError('bar: "ba"~2');
|
||||
expect(result).toEqual(true);
|
||||
});
|
||||
|
||||
test('should return true for Lucene boosting', () => {
|
||||
const result = doesKueryExpressionHaveLuceneSyntaxError('bar: ba^2');
|
||||
expect(result).toEqual(true);
|
||||
});
|
||||
|
||||
test('should return true for Lucene + operator', () => {
|
||||
const result = doesKueryExpressionHaveLuceneSyntaxError('+foo: bar');
|
||||
expect(result).toEqual(true);
|
||||
});
|
||||
|
||||
test('should return true for Lucene - operators', () => {
|
||||
const result = doesKueryExpressionHaveLuceneSyntaxError('-foo: bar');
|
||||
expect(result).toEqual(true);
|
||||
});
|
||||
|
||||
test('should return true for Lucene && operators', () => {
|
||||
const result = doesKueryExpressionHaveLuceneSyntaxError('foo: bar && baz: qux');
|
||||
expect(result).toEqual(true);
|
||||
});
|
||||
|
||||
test('should return true for Lucene || operators', () => {
|
||||
const result = doesKueryExpressionHaveLuceneSyntaxError('foo: bar || baz: qux');
|
||||
expect(result).toEqual(true);
|
||||
});
|
||||
|
||||
test('should return true for mixed KQL/Lucene queries', () => {
|
||||
const result = doesKueryExpressionHaveLuceneSyntaxError('foo: bar and (baz: qux || bag)');
|
||||
expect(result).toEqual(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -56,17 +56,6 @@ export const fromKueryExpression = (
|
|||
}
|
||||
};
|
||||
|
||||
export const doesKueryExpressionHaveLuceneSyntaxError = (
|
||||
expression: string | DslQuery
|
||||
): boolean => {
|
||||
try {
|
||||
fromExpression(expression, { errorOnLuceneSyntax: true }, parseKuery);
|
||||
return false;
|
||||
} catch (e) {
|
||||
return e.message.startsWith('Lucene');
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @params {String} indexPattern
|
||||
* @params {Object} config - contains the dateFormatTZ
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
// Initialization block
|
||||
{
|
||||
const { errorOnLuceneSyntax, parseCursor, cursorSymbol, allowLeadingWildcards = true, helpers: { nodeTypes } } = options;
|
||||
const { parseCursor, cursorSymbol, allowLeadingWildcards = true, helpers: { nodeTypes } } = options;
|
||||
const buildFunctionNode = nodeTypes.function.buildNodeWithArgumentNodes;
|
||||
const buildLiteralNode = nodeTypes.literal.buildNode;
|
||||
const buildWildcardNode = nodeTypes.wildcard.buildNode;
|
||||
|
@ -26,8 +26,7 @@ start
|
|||
}
|
||||
|
||||
OrQuery
|
||||
= &{ return errorOnLuceneSyntax; } LuceneQuery
|
||||
/ head:AndQuery tail:(Or query:AndQuery { return query; })+ {
|
||||
= head:AndQuery tail:(Or query:AndQuery { return query; })+ {
|
||||
const nodes = [head, ...tail];
|
||||
const cursor = parseCursor && nodes.find(node => node.type === 'cursor');
|
||||
if (cursor) return cursor;
|
||||
|
@ -199,15 +198,12 @@ Value "value"
|
|||
|
||||
Or "OR"
|
||||
= Space+ 'or'i Space+
|
||||
/ &{ return errorOnLuceneSyntax; } LuceneOr
|
||||
|
||||
And "AND"
|
||||
= Space+ 'and'i Space+
|
||||
/ &{ return errorOnLuceneSyntax; } LuceneAnd
|
||||
|
||||
Not "NOT"
|
||||
= 'not'i Space+
|
||||
/ &{ return errorOnLuceneSyntax; } LuceneNot
|
||||
|
||||
Literal "literal"
|
||||
= QuotedString / UnquotedLiteral
|
||||
|
@ -306,109 +302,3 @@ Space "whitespace"
|
|||
|
||||
Cursor
|
||||
= &{ return parseCursor; } '@kuery-cursor@' { return cursorSymbol; }
|
||||
|
||||
// Temporary error rules (to help users transition from Lucene... should be removed at some point)
|
||||
|
||||
LuceneOr
|
||||
= Space* '||' Space* {
|
||||
error('LuceneOr');
|
||||
}
|
||||
|
||||
LuceneAnd
|
||||
= Space* '&&' Space* {
|
||||
error('LuceneAnd');
|
||||
}
|
||||
/ '+' {
|
||||
error('LuceneAnd');
|
||||
}
|
||||
|
||||
LuceneNot
|
||||
= '-' {
|
||||
error('LuceneNot');
|
||||
}
|
||||
/ '!' {
|
||||
error('LuceneNot');
|
||||
}
|
||||
|
||||
LuceneQuery
|
||||
= LuceneFieldQuery
|
||||
/ LuceneValue
|
||||
/ LuceneExists
|
||||
|
||||
LuceneFieldQuery
|
||||
= LuceneLiteral Space* ':' Space* LuceneValue
|
||||
|
||||
LuceneValue
|
||||
= LuceneRange
|
||||
/ LuceneWildcard
|
||||
/ LuceneRegex
|
||||
/ LuceneFuzzy
|
||||
/ LuceneProximity
|
||||
/ LuceneBoost
|
||||
|
||||
LuceneExists
|
||||
= '_exists_' Space* ':' Space* LuceneLiteral {
|
||||
error('LuceneExists');
|
||||
}
|
||||
|
||||
LuceneRange
|
||||
= RangeOperator Space* LuceneLiteral {
|
||||
error('LuceneRange');
|
||||
}
|
||||
/ LuceneRangeStart Space* LuceneLiteral LuceneTo LuceneLiteral LuceneRangeEnd {
|
||||
error('LuceneRange');
|
||||
}
|
||||
|
||||
LuceneWildcard
|
||||
= (LuceneUnquotedCharacter / '*')* '?' LuceneWildcard* {
|
||||
error('LuceneWildcard');
|
||||
}
|
||||
|
||||
LuceneRegex
|
||||
= '/' [^/]* '/' {
|
||||
error('LuceneRegex');
|
||||
}
|
||||
|
||||
LuceneFuzzy
|
||||
= LuceneUnquotedLiteral '~' [0-9]* {
|
||||
error('LuceneFuzzy');
|
||||
}
|
||||
|
||||
LuceneProximity
|
||||
= QuotedString '~' [0-9]* {
|
||||
error('LuceneProximity');
|
||||
}
|
||||
|
||||
LuceneBoost
|
||||
= LuceneLiteral '^' [0-9]* {
|
||||
error('LuceneBoost');
|
||||
}
|
||||
|
||||
LuceneLiteral
|
||||
= QuotedString / LuceneUnquotedLiteral
|
||||
|
||||
LuceneUnquotedLiteral
|
||||
= LuceneUnquotedCharacter+
|
||||
|
||||
LuceneUnquotedCharacter
|
||||
= EscapedWhitespace
|
||||
/ EscapedLuceneSpecialCharacter
|
||||
/ !LuceneSpecialCharacter !LuceneKeyword .
|
||||
|
||||
LuceneKeyword
|
||||
= Or / And / LuceneOr / LuceneAnd / LuceneNot / LuceneTo
|
||||
|
||||
EscapedLuceneSpecialCharacter
|
||||
= '\\' LuceneSpecialCharacter { return char; }
|
||||
|
||||
LuceneSpecialCharacter
|
||||
= '+' / '-' / '=' / '>' / '<' / '!' / '(' / ')' / '{' / '}' / '[' / ']' / '^' / '"' / '~' / '*' / '?' / ':' / '\\' / '/'
|
||||
|
||||
LuceneTo
|
||||
= Space+ 'TO' Space+
|
||||
|
||||
LuceneRangeStart
|
||||
= '[' / '{'
|
||||
|
||||
LuceneRangeEnd
|
||||
= ']' / '}'
|
||||
|
|
|
@ -21,7 +21,6 @@ export interface KueryParseOptions {
|
|||
};
|
||||
startRule: string;
|
||||
allowLeadingWildcards: boolean;
|
||||
errorOnLuceneSyntax: boolean;
|
||||
cursorSymbol?: string;
|
||||
parseCursor?: boolean;
|
||||
}
|
||||
|
|
|
@ -9,13 +9,10 @@
|
|||
import dateMath from '@elastic/datemath';
|
||||
import classNames from 'classnames';
|
||||
import React, { useState } from 'react';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
|
||||
import {
|
||||
EuiButton,
|
||||
EuiFlexGroup,
|
||||
EuiFlexItem,
|
||||
EuiLink,
|
||||
EuiSuperDatePicker,
|
||||
EuiFieldText,
|
||||
prettyDuration,
|
||||
|
@ -23,12 +20,10 @@ import {
|
|||
} from '@elastic/eui';
|
||||
// @ts-ignore
|
||||
import { EuiSuperUpdateButton, OnRefreshProps } from '@elastic/eui';
|
||||
import { FormattedMessage } from '@kbn/i18n/react';
|
||||
import { Toast } from 'src/core/public';
|
||||
import { IDataPluginServices, IIndexPattern, TimeRange, TimeHistoryContract, Query } from '../..';
|
||||
import { useKibana, toMountPoint, withKibana } from '../../../../kibana_react/public';
|
||||
import { useKibana, withKibana } from '../../../../kibana_react/public';
|
||||
import QueryStringInputUI from './query_string_input';
|
||||
import { doesKueryExpressionHaveLuceneSyntaxError, UI_SETTINGS } from '../../../common';
|
||||
import { UI_SETTINGS } from '../../../common';
|
||||
import { PersistedLog, getQueryLog } from '../../query';
|
||||
import { NoDataPopover } from './no_data_popover';
|
||||
|
||||
|
@ -72,9 +67,7 @@ export default function QueryBarTopRow(props: QueryBarTopRowProps) {
|
|||
const [isQueryInputFocused, setIsQueryInputFocused] = useState(false);
|
||||
|
||||
const kibana = useKibana<IDataPluginServices>();
|
||||
const { uiSettings, notifications, storage, appName, docLinks } = kibana.services;
|
||||
|
||||
const kueryQuerySyntaxLink: string = docLinks!.links.query.kueryQuerySyntax;
|
||||
const { uiSettings, storage, appName } = kibana.services;
|
||||
|
||||
const queryLanguage = props.query && props.query.language;
|
||||
const persistedLog: PersistedLog | undefined = React.useMemo(
|
||||
|
@ -152,8 +145,6 @@ export default function QueryBarTopRow(props: QueryBarTopRowProps) {
|
|||
}
|
||||
|
||||
function onSubmit({ query, dateRange }: { query?: Query; dateRange: TimeRange }) {
|
||||
handleLuceneSyntaxWarning();
|
||||
|
||||
if (props.timeHistory) {
|
||||
props.timeHistory.add(dateRange);
|
||||
}
|
||||
|
@ -305,60 +296,6 @@ export default function QueryBarTopRow(props: QueryBarTopRowProps) {
|
|||
);
|
||||
}
|
||||
|
||||
function handleLuceneSyntaxWarning() {
|
||||
if (!props.query) return;
|
||||
const { query, language } = props.query;
|
||||
if (
|
||||
language === 'kuery' &&
|
||||
typeof query === 'string' &&
|
||||
(!storage || !storage.get('kibana.luceneSyntaxWarningOptOut')) &&
|
||||
doesKueryExpressionHaveLuceneSyntaxError(query)
|
||||
) {
|
||||
const toast = notifications!.toasts.addWarning({
|
||||
title: i18n.translate('data.query.queryBar.luceneSyntaxWarningTitle', {
|
||||
defaultMessage: 'Lucene syntax warning',
|
||||
}),
|
||||
text: toMountPoint(
|
||||
<div>
|
||||
<p>
|
||||
<FormattedMessage
|
||||
id="data.query.queryBar.luceneSyntaxWarningMessage"
|
||||
defaultMessage="It looks like you may be trying to use Lucene query syntax, although you
|
||||
have Kibana Query Language (KQL) selected. Please review the KQL docs {link}."
|
||||
values={{
|
||||
link: (
|
||||
<EuiLink href={kueryQuerySyntaxLink} target="_blank">
|
||||
<FormattedMessage
|
||||
id="data.query.queryBar.syntaxOptionsDescription.docsLinkText"
|
||||
defaultMessage="here"
|
||||
/>
|
||||
</EuiLink>
|
||||
),
|
||||
}}
|
||||
/>
|
||||
</p>
|
||||
<EuiFlexGroup justifyContent="flexEnd" gutterSize="s">
|
||||
<EuiFlexItem grow={false}>
|
||||
<EuiButton size="s" onClick={() => onLuceneSyntaxWarningOptOut(toast)}>
|
||||
<FormattedMessage
|
||||
id="data.query.queryBar.luceneSyntaxWarningOptOutText"
|
||||
defaultMessage="Don't show again"
|
||||
/>
|
||||
</EuiButton>
|
||||
</EuiFlexItem>
|
||||
</EuiFlexGroup>
|
||||
</div>
|
||||
),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function onLuceneSyntaxWarningOptOut(toast: Toast) {
|
||||
if (!storage) return;
|
||||
storage.set('kibana.luceneSyntaxWarningOptOut', true);
|
||||
notifications!.toasts.remove(toast);
|
||||
}
|
||||
|
||||
const classes = classNames('kbnQueryBar', {
|
||||
'kbnQueryBar--withDatePicker': props.showDatePicker,
|
||||
});
|
||||
|
|
|
@ -952,12 +952,8 @@
|
|||
"data.query.queryBar.kqlOffLabel": "オフ",
|
||||
"data.query.queryBar.kqlOnLabel": "オン",
|
||||
"data.query.queryBar.luceneLanguageName": "Lucene",
|
||||
"data.query.queryBar.luceneSyntaxWarningMessage": "Lucene クエリ構文を使用しているようですが、Kibana クエリ言語 (KQL) が選択されています。KQL ドキュメント {link} を確認してください。",
|
||||
"data.query.queryBar.luceneSyntaxWarningOptOutText": "今後表示しない",
|
||||
"data.query.queryBar.luceneSyntaxWarningTitle": "Lucene 構文警告",
|
||||
"data.query.queryBar.searchInputAriaLabel": "{pageType} ページの検索とフィルタリングを行うには入力を開始してください",
|
||||
"data.query.queryBar.searchInputPlaceholder": "検索",
|
||||
"data.query.queryBar.syntaxOptionsDescription.docsLinkText": "こちら",
|
||||
"data.query.queryBar.syntaxOptionsTitle": "構文オプション",
|
||||
"data.search.aggs.aggGroups.bucketsText": "バケット",
|
||||
"data.search.aggs.aggGroups.metricsText": "メトリック",
|
||||
|
|
|
@ -955,12 +955,8 @@
|
|||
"data.query.queryBar.kqlOffLabel": "关闭",
|
||||
"data.query.queryBar.kqlOnLabel": "开启",
|
||||
"data.query.queryBar.luceneLanguageName": "Lucene",
|
||||
"data.query.queryBar.luceneSyntaxWarningMessage": "尽管选择了 Kibana 查询语言 (KQL),但似乎您正在尝试使用 Lucene 查询语法。请查看 KQL 文档 {link}。",
|
||||
"data.query.queryBar.luceneSyntaxWarningOptOutText": "不再显示",
|
||||
"data.query.queryBar.luceneSyntaxWarningTitle": "Lucene 语法警告",
|
||||
"data.query.queryBar.searchInputAriaLabel": "开始键入内容,以搜索并筛选 {pageType} 页面",
|
||||
"data.query.queryBar.searchInputPlaceholder": "搜索",
|
||||
"data.query.queryBar.syntaxOptionsDescription.docsLinkText": "此处",
|
||||
"data.query.queryBar.syntaxOptionsTitle": "语法选项",
|
||||
"data.search.aggs.aggGroups.bucketsText": "存储桶",
|
||||
"data.search.aggs.aggGroups.metricsText": "指标",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue