| 1 |
table_create Memos TABLE_NO_KEY |
| 2 |
column_create Memos content COLUMN_SCALAR ShortText |
| 3 |
|
| 4 |
table_create Terms TABLE_PAT_KEY ShortText \ |
| 5 |
--default_tokenizer TokenBigram \ |
| 6 |
--normalizer NormalizerAuto |
| 7 |
column_create Terms index COLUMN_INDEX|WITH_POSITION Memos content |
| 8 |
|
| 9 |
load --table Memos |
| 10 |
[ |
| 11 |
{"content": "Groonga is a full text search engine."}, |
| 12 |
{"content": "Rroonga is the Ruby bindings of Groonga."}, |
| 13 |
{"content": "Mroonga is a MySQL storage engine based of Groonga."} |
| 14 |
] |
| 15 |
|
| 16 |
select Memos \ |
| 17 |
--match_columns content \ |
| 18 |
--query 'Groonga <0.1Ruby' \ |
| 19 |
--columns[score].stage filtered \ |
| 20 |
--columns[score].flags COLUMN_SCALAR \ |
| 21 |
--columns[score].type Float32 \ |
| 22 |
--columns[score].value _score \ |
| 23 |
--output_columns 'content,score' \ |
| 24 |
--sort_keys -score,_id |
| 25 |
|