| 1 |
table_create Entries TABLE_NO_KEY |
| 2 |
column_create Entries title COLUMN_SCALAR ShortText |
| 3 |
column_create Entries content COLUMN_SCALAR ShortText |
| 4 |
|
| 5 |
table_create Tokens TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram |
| 6 |
column_create Tokens entries_title COLUMN_INDEX|WITH_POSITION Entries title |
| 7 |
column_create Tokens entries_content COLUMN_INDEX|WITH_POSITION Entries content |
| 8 |
|
| 9 |
load --table Entries |
| 10 |
[ |
| 11 |
{"title": "groonga and MySQL", "content": "groonga + MySQL = mroonga."} |
| 12 |
] |
| 13 |
|
| 14 |
select Entries \ |
| 15 |
--output_columns 'snippet_html(title), title, content' \ |
| 16 |
--match_columns 'title' \ |
| 17 |
--query groonga |