| 1 |
#$GRN_QUERY_PARALLEL_OR_N_CONDITIONS_THRESHOLD=1 |
| 2 |
|
| 3 |
plugin_register token_filters/stop_word |
| 4 |
|
| 5 |
table_create Memos TABLE_NO_KEY |
| 6 |
column_create Memos content COLUMN_SCALAR ShortText |
| 7 |
|
| 8 |
table_create Terms TABLE_PAT_KEY ShortText \ |
| 9 |
--default_tokenizer TokenBigram \ |
| 10 |
--normalizer NormalizerAuto \ |
| 11 |
--token_filters TokenFilterStopWord |
| 12 |
column_create Terms memos_content COLUMN_INDEX|WITH_POSITION Memos content |
| 13 |
column_create Terms is_stop_word COLUMN_SCALAR Bool |
| 14 |
|
| 15 |
load --table Terms |
| 16 |
[ |
| 17 |
{"_key": "and", "is_stop_word": true} |
| 18 |
] |
| 19 |
|
| 20 |
load --table Memos |
| 21 |
[ |
| 22 |
{"content": "Hello"}, |
| 23 |
{"content": "Hello and Good-bye"}, |
| 24 |
{"content": "Good-bye"} |
| 25 |
] |
| 26 |
|
| 27 |
select Memos \ |
| 28 |
--filter 'query_parallel_or( \ |
| 29 |
"content", \ |
| 30 |
"Hello and", \ |
| 31 |
"nonexistent", \ |
| 32 |
{"options": {"TokenFilterStopWord.enable": false}})' \ |
| 33 |
--match_escalation_threshold -1 \ |
| 34 |
--sort_keys -_score |