| 1 |
table_create Bigram TABLE_PAT_KEY ShortText --default_tokenizer TokenBigramSplitSymbolAlpha --normalizer NormalizerAuto |
| 2 |
[[0,0.0,0.0],true] |
| 3 |
table_create Diaries TABLE_HASH_KEY ShortText |
| 4 |
[[0,0.0,0.0],true] |
| 5 |
column_create Diaries title COLUMN_SCALAR ShortText |
| 6 |
[[0,0.0,0.0],true] |
| 7 |
column_create Diaries content COLUMN_SCALAR Text |
| 8 |
[[0,0.0,0.0],true] |
| 9 |
column_create Bigram diaries COLUMN_INDEX|WITH_POSITION|WITH_SECTION Diaries title,content |
| 10 |
[[0,0.0,0.0],true] |
| 11 |
load --table Diaries |
| 12 |
[ |
| 13 |
{ |
| 14 |
"_key": "2013-02-06", |
| 15 |
"title": "groonga", |
| 16 |
"content": "I found groonga that is a fast fulltext search engine!" |
| 17 |
}, |
| 18 |
{ |
| 19 |
"_key": "2013-02-07", |
| 20 |
"title": "mroonga", |
| 21 |
"content": "I found mroonga that is a MySQL storage engine to use groonga!" |
| 22 |
}, |
| 23 |
{ |
| 24 |
"_key": "2013-02-08", |
| 25 |
"title": "rroonga", |
| 26 |
"content": "I found rroonga that is Ruby bindings for groonga!" |
| 27 |
} |
| 28 |
] |
| 29 |
[[0,0.0,0.0],3] |
| 30 |
select Diaries --match_columns 'Bigram.diaries * 10' --query 'engine OR mroonga' --output_columns 'title,_score' |
| 31 |
[ |
| 32 |
[ |
| 33 |
0, |
| 34 |
0.0, |
| 35 |
0.0 |
| 36 |
], |
| 37 |
[ |
| 38 |
[ |
| 39 |
[ |
| 40 |
2 |
| 41 |
], |
| 42 |
[ |
| 43 |
[ |
| 44 |
"title", |
| 45 |
"ShortText" |
| 46 |
], |
| 47 |
[ |
| 48 |
"_score", |
| 49 |
"Int32" |
| 50 |
] |
| 51 |
], |
| 52 |
[ |
| 53 |
"groonga", |
| 54 |
10 |
| 55 |
], |
| 56 |
[ |
| 57 |
"mroonga", |
| 58 |
30 |
| 59 |
] |
| 60 |
] |
| 61 |
] |
| 62 |
] |