| 1 |
table_create Users TABLE_NO_KEY |
| 2 |
column_create Users name COLUMN_SCALAR ShortText |
| 3 |
column_create Users memo COLUMN_SCALAR ShortText |
| 4 |
column_create Users tag COLUMN_SCALAR ShortText |
| 5 |
|
| 6 |
table_create Terms TABLE_PAT_KEY ShortText \ |
| 7 |
--default_tokenizer TokenNgram \ |
| 8 |
--normalizer NormalizerNFKC130 |
| 9 |
column_create Terms name COLUMN_INDEX|WITH_POSITION Users name |
| 10 |
column_create Terms memo COLUMN_INDEX|WITH_POSITION Users memo |
| 11 |
column_create Terms tag COLUMN_INDEX|WITH_POSITION Users tag |
| 12 |
|
| 13 |
load --table Users |
| 14 |
[ |
| 15 |
{"name": "Alice", "memo": "Groonga user", "tag": "Groonga"}, |
| 16 |
{"name": "Bob", "memo": "Rroonga user", "tag": "Rroonga"} |
| 17 |
] |
| 18 |
|
| 19 |
select Users \ |
| 20 |
--output_columns _score,name \ |
| 21 |
--filter 'query(["name * 100 || memo * 10", "", "tag * 1"], \ |
| 22 |
"Alice OR Groonga")' |