| 1 |
table_create Bigram TABLE_PAT_KEY ShortText --default_tokenizer TokenBigramSplitSymbolAlpha --normalizer NormalizerAuto |
| 2 |
[[0,0.0,0.0],true] |
| 3 |
table_create Memos TABLE_HASH_KEY ShortText |
| 4 |
[[0,0.0,0.0],true] |
| 5 |
column_create Memos title COLUMN_SCALAR ShortText |
| 6 |
[[0,0.0,0.0],true] |
| 7 |
column_create Memos content COLUMN_SCALAR Text |
| 8 |
[[0,0.0,0.0],true] |
| 9 |
column_create Bigram memos1 COLUMN_INDEX|WITH_POSITION|WITH_SECTION Memos title,content |
| 10 |
[[0,0.0,0.0],true] |
| 11 |
column_create Bigram memos2 COLUMN_INDEX|WITH_POSITION|WITH_SECTION Memos content,title |
| 12 |
[[0,0.0,0.0],true] |
| 13 |
load --table Memos |
| 14 |
[ |
| 15 |
{ |
| 16 |
"_key": "2013-02-06", |
| 17 |
"title": "Groonga", |
| 18 |
"content": "It's a fast fulltext search engine!" |
| 19 |
}, |
| 20 |
{ |
| 21 |
"_key": "2013-02-07", |
| 22 |
"title": "Mroonga", |
| 23 |
"content": "It's a MySQL storage engine to use Groonga!" |
| 24 |
}, |
| 25 |
{ |
| 26 |
"_key": "2013-02-08", |
| 27 |
"title": "Rroonga", |
| 28 |
"content": "It's Rroonga bindings for Groonga!" |
| 29 |
} |
| 30 |
] |
| 31 |
[[0,0.0,0.0],3] |
| 32 |
select Memos --match_columns 'title' --query 'Groonga' --output_columns 'title,_score' |
| 33 |
[[0,0.0,0.0],[[[1],[["title","ShortText"],["_score","Int32"]],["Groonga",1]]]] |