| 1 |
# This is too slow with HTTP chunked. |
| 2 |
#@require-interface stdio |
| 3 |
|
| 4 |
table_create Memos TABLE_NO_KEY |
| 5 |
column_create Memos content COLUMN_SCALAR ShortText |
| 6 |
|
| 7 |
table_create Terms TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram |
| 8 |
column_create Terms memo_content COLUMN_INDEX|WITH_POSITION Memos content |
| 9 |
|
| 10 |
load --table Memos |
| 11 |
[ |
| 12 |
["content"], |
| 13 |
["NTT docomo"] |
| 14 |
] |
| 15 |
|
| 16 |
table_create SudachiDictionary TABLE_PAT_KEY ShortText \ |
| 17 |
--normalizer NormalizerNFKC130 |
| 18 |
column_create SudachiDictionary synonyms COLUMN_VECTOR ShortText |
| 19 |
|
| 20 |
#@timeout 300 |
| 21 |
#@disable-logging |
| 22 |
#@synonym-generate SudachiDictionary |
| 23 |
#@enable-logging |
| 24 |
#@timeout default |
| 25 |
|
| 26 |
select \ |
| 27 |
--table Memos \ |
| 28 |
--query_expander SudachiDictionary.synonyms \ |
| 29 |
--match_columns content \ |
| 30 |
--query ドコモ \ |
| 31 |
--output_columns content,_score \ |
| 32 |
--command_version 3 |