| 1 |
table_create Memos TABLE_NO_KEY |
| 2 |
[[0,0.0,0.0],true] |
| 3 |
column_create Memos title COLUMN_SCALAR ShortText |
| 4 |
[[0,0.0,0.0],true] |
| 5 |
column_create Memos content COLUMN_SCALAR ShortText |
| 6 |
[[0,0.0,0.0],true] |
| 7 |
table_create Terms TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerAuto |
| 8 |
[[0,0.0,0.0],true] |
| 9 |
column_create Terms index COLUMN_INDEX|WITH_POSITION|WITH_SECTION Memos title,content |
| 10 |
[[0,0.0,0.0],true] |
| 11 |
load --table Memos |
| 12 |
[ |
| 13 |
{"title": "Groonga", "content": "Groonga is a full text search engine."}, |
| 14 |
{"title": "Rroonga", "content": "Rroonga is the Ruby bindings of Groonga."}, |
| 15 |
{"title": "Mroonga", "content": "Mroonga is a MySQL storage engine based of Groonga."} |
| 16 |
] |
| 17 |
[[0,0.0,0.0],3] |
| 18 |
select Memos --query 'title:@Groonga ~0.1content:@full ~0.3content:@text' --columns[score].stage filtered --columns[score].flags COLUMN_SCALAR --columns[score].type Float32 --columns[score].value _score --output_columns 'title,content,score' |
| 19 |
[ |
| 20 |
[ |
| 21 |
0, |
| 22 |
0.0, |
| 23 |
0.0 |
| 24 |
], |
| 25 |
[ |
| 26 |
[ |
| 27 |
[ |
| 28 |
1 |
| 29 |
], |
| 30 |
[ |
| 31 |
[ |
| 32 |
"title", |
| 33 |
"ShortText" |
| 34 |
], |
| 35 |
[ |
| 36 |
"content", |
| 37 |
"ShortText" |
| 38 |
], |
| 39 |
[ |
| 40 |
"score", |
| 41 |
"Float32" |
| 42 |
] |
| 43 |
], |
| 44 |
[ |
| 45 |
"Groonga", |
| 46 |
"Groonga is a full text search engine.", |
| 47 |
0.6 |
| 48 |
] |
| 49 |
] |
| 50 |
] |
| 51 |
] |