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