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