| 1 |
table_create Memos TABLE_NO_KEY |
| 2 |
[[0,0.0,0.0],true] |
| 3 |
column_create Memos content COLUMN_SCALAR ShortText |
| 4 |
[[0,0.0,0.0],true] |
| 5 |
table_create Lexicon TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram |
| 6 |
[[0,0.0,0.0],true] |
| 7 |
column_create Lexicon diary_content COLUMN_INDEX|WITH_POSITION Memos content |
| 8 |
[[0,0.0,0.0],true] |
| 9 |
table_create Synonyms TABLE_PAT_KEY ShortText |
| 10 |
[[0,0.0,0.0],true] |
| 11 |
column_create Synonyms words COLUMN_SCALAR ShortText |
| 12 |
[[0,0.0,0.0],true] |
| 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 |
[[0,0.0,0.0],5] |
| 23 |
load --table Synonyms |
| 24 |
[ |
| 25 |
["_key", "words"], |
| 26 |
["rroonga", "(rroonga OR (Ruby groonga))"] |
| 27 |
] |
| 28 |
[[0,0.0,0.0],1] |
| 29 |
select --table Memos --query_expander Synonyms.words --match_columns content --query rroonga |
| 30 |
[ |
| 31 |
[ |
| 32 |
0, |
| 33 |
0.0, |
| 34 |
0.0 |
| 35 |
], |
| 36 |
[ |
| 37 |
[ |
| 38 |
[ |
| 39 |
2 |
| 40 |
], |
| 41 |
[ |
| 42 |
[ |
| 43 |
"_id", |
| 44 |
"UInt32" |
| 45 |
], |
| 46 |
[ |
| 47 |
"content", |
| 48 |
"ShortText" |
| 49 |
] |
| 50 |
], |
| 51 |
[ |
| 52 |
3, |
| 53 |
"Start rroonga!" |
| 54 |
], |
| 55 |
[ |
| 56 |
5, |
| 57 |
"Learning Ruby and groonga..." |
| 58 |
] |
| 59 |
] |
| 60 |
] |
| 61 |
] |