| 1 |
table_create Memos TABLE_HASH_KEY ShortText |
| 2 |
[[0,0.0,0.0],true] |
| 3 |
load --table Memos |
| 4 |
[ |
| 5 |
{"_key": "groonga"}, |
| 6 |
{"_key": "mroonga"}, |
| 7 |
{"_key": "rroonga"}, |
| 8 |
{"_key": "ruby"}, |
| 9 |
{"_key": "learn"} |
| 10 |
] |
| 11 |
[[0,0.0,0.0],5] |
| 12 |
table_create Notes TABLE_HASH_KEY ShortText |
| 13 |
[[0,0.0,0.0],true] |
| 14 |
column_create Notes memo COLUMN_SCALAR Memos |
| 15 |
[[0,0.0,0.0],true] |
| 16 |
column_create Notes title COLUMN_SCALAR ShortText |
| 17 |
[[0,0.0,0.0],true] |
| 18 |
column_create Notes content COLUMN_SCALAR ShortText |
| 19 |
[[0,0.0,0.0],true] |
| 20 |
column_create Memos notes COLUMN_INDEX Notes memo |
| 21 |
[[0,0.0,0.0],true] |
| 22 |
table_create Lexicon TABLE_PAT_KEY ShortText --default_tokenizer TokenNgram --normalizer NormalizerNFKC130 |
| 23 |
[[0,0.0,0.0],true] |
| 24 |
column_create Lexicon notes_title COLUMN_INDEX|WITH_POSITION Notes title |
| 25 |
[[0,0.0,0.0],true] |
| 26 |
column_create Lexicon notes_content COLUMN_INDEX|WITH_POSITION Notes content |
| 27 |
[[0,0.0,0.0],true] |
| 28 |
load --table Notes |
| 29 |
[ |
| 30 |
{"_key": "Groonga", "memo": "groonga", "title": "Groonga", "content": "Start Groonga!"}, |
| 31 |
{"_key": "Mroonga", "memo": "mroonga", "title": "Mroonga", "content": "Start Mroonga!"}, |
| 32 |
{"_key": "Rroonga", "memo": "rroonga", "title": "Rroonga", "content": "Start Rroonga!"}, |
| 33 |
{"_key": "Ruby", "memo": "ruby", "title": "Ruby", "content": "Start Ruby!"}, |
| 34 |
{"_key": "Learn", "memo": "learn", "title": "Learn", "content": "Learning Ruby and Groonga..."} |
| 35 |
] |
| 36 |
[[0,0.0,0.0],5] |
| 37 |
select Memos --match_columns "notes.title || notes.content" --query rroonga --output_columns _key,_score |
| 38 |
[[0,0.0,0.0],[[[1],[["_key","ShortText"],["_score","Int32"]],["rroonga",2]]]] |