| 1 |
table_create Documents TABLE_NO_KEY |
| 2 |
[[0,0.0,0.0],true] |
| 3 |
column_create Documents title COLUMN_SCALAR ShortText |
| 4 |
[[0,0.0,0.0],true] |
| 5 |
column_create Documents content COLUMN_SCALAR Text |
| 6 |
[[0,0.0,0.0],true] |
| 7 |
table_create Terms TABLE_PAT_KEY|KEY_NORMALIZE ShortText --default_tokenizer TokenBigram |
| 8 |
[[0,0.0,0.0],true] |
| 9 |
column_create Terms document_title_index COLUMN_INDEX|WITH_POSITION Documents title |
| 10 |
[[0,0.0,0.0],true] |
| 11 |
column_create Terms document_content_index COLUMN_INDEX|WITH_POSITION Documents content |
| 12 |
[[0,0.0,0.0],true] |
| 13 |
load --table Documents |
| 14 |
[ |
| 15 |
["title", "content"], |
| 16 |
["Groonga overview", "Groonga is a fast and accurate full text search engine based on inverted index."], |
| 17 |
["Full text search and Instant update", "In widely used DBMSs, updates are immediately processed, for example, a newly registered record appears in the result of the next query."], |
| 18 |
["Column store and aggregate query", "People can collect more than enough data in the Internet era."] |
| 19 |
] |
| 20 |
[[0,0.0,0.0],3] |
| 21 |
select Documents --match_columns title||content --query 'groonga' --output_columns '_id, snippet_html(title + " " + content)' |
| 22 |
[ |
| 23 |
[ |
| 24 |
0, |
| 25 |
0.0, |
| 26 |
0.0 |
| 27 |
], |
| 28 |
[ |
| 29 |
[ |
| 30 |
[ |
| 31 |
1 |
| 32 |
], |
| 33 |
[ |
| 34 |
[ |
| 35 |
"_id", |
| 36 |
"UInt32" |
| 37 |
], |
| 38 |
[ |
| 39 |
"snippet_html", |
| 40 |
null |
| 41 |
] |
| 42 |
], |
| 43 |
[ |
| 44 |
1, |
| 45 |
[ |
| 46 |
"<span class=\"keyword\">Groonga</span> overview <span class=\"keyword\">Groonga</span> is a fast and accurate full text search engine based on inverted index." |
| 47 |
] |
| 48 |
] |
| 49 |
] |
| 50 |
] |
| 51 |
] |