| 1 |
#$GRN_QUERY_EXPANDER_TSV_SYNONYMS_FILE=#{db_directory}/synonyms.tsv |
| 2 |
#@copy-path fixture/query_expander/tsv/expand.tsv #{db_directory}/synonyms.tsv |
| 3 |
plugin_register "query_expanders/tsv" |
| 4 |
|
| 5 |
table_create Memos TABLE_NO_KEY |
| 6 |
column_create Memos content COLUMN_SCALAR ShortText |
| 7 |
|
| 8 |
table_create Lexicon TABLE_PAT_KEY ShortText \ |
| 9 |
--normalizer NormalizerAuto \ |
| 10 |
--default_tokenizer TokenBigram |
| 11 |
column_create Lexicon memos_content COLUMN_INDEX|WITH_POSITION Memos content |
| 12 |
|
| 13 |
load --table Memos |
| 14 |
[ |
| 15 |
["content"], |
| 16 |
["Start Groonga!"], |
| 17 |
["Start Mroonga!"], |
| 18 |
["Start Rroonga!"], |
| 19 |
["Start Ruby!"], |
| 20 |
["Learning Ruby and Groonga..."] |
| 21 |
] |
| 22 |
|
| 23 |
select \ |
| 24 |
--table Memos \ |
| 25 |
--filter 'query("content", "rroonga content:@rroonga", \ |
| 26 |
{"expander": "QueryExpanderTSV"})' |