| 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 --default_tokenizer TokenBigram |
| 9 |
column_create Lexicon diary_content COLUMN_INDEX|WITH_POSITION Memos content |
| 10 |
|
| 11 |
load --table Memos |
| 12 |
[ |
| 13 |
["content"], |
| 14 |
["Start groonga!"], |
| 15 |
["Start mroonga!"], |
| 16 |
["Start rroonga!"], |
| 17 |
["Start Ruby!"], |
| 18 |
["Learning Ruby and groonga..."] |
| 19 |
] |
| 20 |
|
| 21 |
select --table Memos --query_expander QueryExpanderTSV \ |
| 22 |
--match_columns content --query rroonga |
| 23 |
|