Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
240 additions
and
10 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
54 changes: 54 additions & 0 deletions
54
test/command/suite/select/filter/index/regexp/escape.expected
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,54 @@ | ||
table_create Logs TABLE_NO_KEY | ||
[[0,0.0,0.0],true] | ||
column_create Logs message COLUMN_SCALAR Text | ||
[[0,0.0,0.0],true] | ||
table_create RegexpLexicon TABLE_PAT_KEY ShortText --default_tokenizer TokenRegexp --normalizer NormalizerAuto | ||
[[0,0.0,0.0],true] | ||
column_create RegexpLexicon logs_message_index COLUMN_INDEX|WITH_POSITION Logs message | ||
[[0,0.0,0.0],true] | ||
load --table Logs | ||
[ | ||
{"message": "host1:[error]: No memory"}, | ||
{"message": "host1:[warning]: Remained disk space is less than 30%"}, | ||
{"message": "host1:[error]: Disk full"}, | ||
{"message": "host2:[error]: No memory"}, | ||
{"message": "host2:[info]: Shutdown"} | ||
] | ||
[[0,0.0,0.0],5] | ||
select Logs --filter 'message @~ "\\\\[error\\\\]"' | ||
[ | ||
[ | ||
0, | ||
0.0, | ||
0.0 | ||
], | ||
[ | ||
[ | ||
[ | ||
3 | ||
], | ||
[ | ||
[ | ||
"_id", | ||
"UInt32" | ||
], | ||
[ | ||
"message", | ||
"Text" | ||
] | ||
], | ||
[ | ||
1, | ||
"host1:[error]: No memory" | ||
], | ||
[ | ||
3, | ||
"host1:[error]: Disk full" | ||
], | ||
[ | ||
4, | ||
"host2:[error]: No memory" | ||
] | ||
] | ||
] | ||
] |
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,19 @@ | ||
table_create Logs TABLE_NO_KEY | ||
column_create Logs message COLUMN_SCALAR Text | ||
|
||
table_create RegexpLexicon TABLE_PAT_KEY ShortText \ | ||
--default_tokenizer TokenRegexp \ | ||
--normalizer NormalizerAuto | ||
column_create RegexpLexicon logs_message_index \ | ||
COLUMN_INDEX|WITH_POSITION Logs message | ||
|
||
load --table Logs | ||
[ | ||
{"message": "host1:[error]: No memory"}, | ||
{"message": "host1:[warning]: Remained disk space is less than 30%"}, | ||
{"message": "host1:[error]: Disk full"}, | ||
{"message": "host2:[error]: No memory"}, | ||
{"message": "host2:[info]: Shutdown"} | ||
] | ||
|
||
select Logs --filter 'message @~ "\\\\[error\\\\]"' |
30 changes: 30 additions & 0 deletions
30
test/command/suite/tokenizers/regexp/get/escape/one.expected
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,30 @@ | ||
table_create Lexicon TABLE_PAT_KEY ShortText --default_tokenizer TokenRegexp | ||
[[0,0.0,0.0],true] | ||
table_tokenize Lexicon "[e" --mode ADD | ||
[ | ||
[ | ||
0, | ||
0.0, | ||
0.0 | ||
], | ||
[ | ||
{ | ||
"value": "", | ||
"position": 0 | ||
}, | ||
{ | ||
"value": "[e", | ||
"position": 1 | ||
}, | ||
{ | ||
"value": "e", | ||
"position": 2 | ||
}, | ||
{ | ||
"value": "", | ||
"position": 3 | ||
} | ||
] | ||
] | ||
table_tokenize Lexicon "\\[e" --mode GET | ||
[[0,0.0,0.0],[{"value":"[e","position":0}]] |
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,5 @@ | ||
table_create Lexicon TABLE_PAT_KEY ShortText \ | ||
--default_tokenizer TokenRegexp | ||
table_tokenize Lexicon "[e" --mode ADD | ||
|
||
table_tokenize Lexicon "\\[e" --mode GET |
98 changes: 98 additions & 0 deletions
98
test/command/suite/tokenizers/regexp/get/escape/two.expected
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,98 @@ | ||
table_create Lexicon TABLE_PAT_KEY ShortText --default_tokenizer TokenRegexp | ||
[[0,0.0,0.0],true] | ||
table_tokenize Lexicon "c:\\server" --mode ADD | ||
[ | ||
[ | ||
0, | ||
0.0, | ||
0.0 | ||
], | ||
[ | ||
{ | ||
"value": "", | ||
"position": 0 | ||
}, | ||
{ | ||
"value": "c:", | ||
"position": 1 | ||
}, | ||
{ | ||
"value": ":\\", | ||
"position": 2 | ||
}, | ||
{ | ||
"value": "\\s", | ||
"position": 3 | ||
}, | ||
{ | ||
"value": "se", | ||
"position": 4 | ||
}, | ||
{ | ||
"value": "er", | ||
"position": 5 | ||
}, | ||
{ | ||
"value": "rv", | ||
"position": 6 | ||
}, | ||
{ | ||
"value": "ve", | ||
"position": 7 | ||
}, | ||
{ | ||
"value": "er", | ||
"position": 8 | ||
}, | ||
{ | ||
"value": "r", | ||
"position": 9 | ||
}, | ||
{ | ||
"value": "", | ||
"position": 10 | ||
} | ||
] | ||
] | ||
table_tokenize Lexicon "c:\\\\server" --mode GET | ||
[ | ||
[ | ||
0, | ||
0.0, | ||
0.0 | ||
], | ||
[ | ||
{ | ||
"value": "c:", | ||
"position": 0 | ||
}, | ||
{ | ||
"value": ":\\", | ||
"position": 1 | ||
}, | ||
{ | ||
"value": "\\s", | ||
"position": 2 | ||
}, | ||
{ | ||
"value": "se", | ||
"position": 3 | ||
}, | ||
{ | ||
"value": "er", | ||
"position": 4 | ||
}, | ||
{ | ||
"value": "rv", | ||
"position": 5 | ||
}, | ||
{ | ||
"value": "ve", | ||
"position": 6 | ||
}, | ||
{ | ||
"value": "er", | ||
"position": 7 | ||
} | ||
] | ||
] |
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,5 @@ | ||
table_create Lexicon TABLE_PAT_KEY ShortText \ | ||
--default_tokenizer TokenRegexp | ||
table_tokenize Lexicon "c:\\server" --mode ADD | ||
|
||
table_tokenize Lexicon "c:\\\\server" --mode GET |