| 1 |
table_create Memos TABLE_HASH_KEY ShortText |
| 2 |
[[0,0.0,0.0],true] |
| 3 |
table_create Terms TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerAuto |
| 4 |
[[0,0.0,0.0],true] |
| 5 |
column_create Terms memos_key COLUMN_INDEX|WITH_POSITION Memos _key |
| 6 |
[[0,0.0,0.0],true] |
| 7 |
table_create Synonyms TABLE_PAT_KEY ShortText --normalizer NormalizerAuto |
| 8 |
[[0,0.0,0.0],true] |
| 9 |
column_create Synonyms words COLUMN_VECTOR ShortText |
| 10 |
[[0,0.0,0.0],true] |
| 11 |
load --table Memos |
| 12 |
[ |
| 13 |
{"_key": "Groonga is fast!"}, |
| 14 |
{"_key": "Mroonga is fast!"}, |
| 15 |
{"_key": "Groonga sticker!"}, |
| 16 |
{"_key": "Rroonga is fast!"}, |
| 17 |
{"_key": "Ruby is good!"}, |
| 18 |
{"_key": "Ruby and Groonga combination is good!"} |
| 19 |
] |
| 20 |
[[0,0.0,0.0],6] |
| 21 |
load --table Synonyms |
| 22 |
[ |
| 23 |
["_key", "words"], |
| 24 |
["Rroonga", ["Rroonga", "Ruby Groonga"]] |
| 25 |
] |
| 26 |
[[0,0.0,0.0],1] |
| 27 |
select Memos --slices[rroonga].match_columns '_key' --slices[rroonga].query 'Rroonga' --slices[rroonga].query_expander Synonyms.words |
| 28 |
[ |
| 29 |
[ |
| 30 |
0, |
| 31 |
0.0, |
| 32 |
0.0 |
| 33 |
], |
| 34 |
[ |
| 35 |
[ |
| 36 |
[ |
| 37 |
6 |
| 38 |
], |
| 39 |
[ |
| 40 |
[ |
| 41 |
"_id", |
| 42 |
"UInt32" |
| 43 |
], |
| 44 |
[ |
| 45 |
"_key", |
| 46 |
"ShortText" |
| 47 |
] |
| 48 |
], |
| 49 |
[ |
| 50 |
1, |
| 51 |
"Groonga is fast!" |
| 52 |
], |
| 53 |
[ |
| 54 |
2, |
| 55 |
"Mroonga is fast!" |
| 56 |
], |
| 57 |
[ |
| 58 |
3, |
| 59 |
"Groonga sticker!" |
| 60 |
], |
| 61 |
[ |
| 62 |
4, |
| 63 |
"Rroonga is fast!" |
| 64 |
], |
| 65 |
[ |
| 66 |
5, |
| 67 |
"Ruby is good!" |
| 68 |
], |
| 69 |
[ |
| 70 |
6, |
| 71 |
"Ruby and Groonga combination is good!" |
| 72 |
] |
| 73 |
], |
| 74 |
{ |
| 75 |
"rroonga": [ |
| 76 |
[ |
| 77 |
2 |
| 78 |
], |
| 79 |
[ |
| 80 |
[ |
| 81 |
"_id", |
| 82 |
"UInt32" |
| 83 |
], |
| 84 |
[ |
| 85 |
"_key", |
| 86 |
"ShortText" |
| 87 |
] |
| 88 |
], |
| 89 |
[ |
| 90 |
4, |
| 91 |
"Rroonga is fast!" |
| 92 |
], |
| 93 |
[ |
| 94 |
6, |
| 95 |
"Ruby and Groonga combination is good!" |
| 96 |
] |
| 97 |
] |
| 98 |
} |
| 99 |
] |
| 100 |
] |