| 1 |
plugin_register functions/index_column |
| 2 |
|
| 3 |
table_create Terms TABLE_PAT_KEY ShortText \ |
| 4 |
--default_tokenizer TokenBigram \ |
| 5 |
--normalizer NormalizerAuto |
| 6 |
|
| 7 |
table_create Memos TABLE_HASH_KEY ShortText |
| 8 |
column_create Memos tags COLUMN_VECTOR ShortText |
| 9 |
|
| 10 |
column_create Terms memos \ |
| 11 |
COLUMN_INDEX|WITH_POSITION|WITH_SECTION \ |
| 12 |
Memos tags |
| 13 |
|
| 14 |
load --table Memos |
| 15 |
[ |
| 16 |
{ |
| 17 |
"_key": "Groonga", |
| 18 |
"tags": ["groonga", "full-text-search"] |
| 19 |
} |
| 20 |
] |
| 21 |
|
| 22 |
delete --table Memos --filter true |
| 23 |
|
| 24 |
select Memos |
| 25 |
|
| 26 |
select Terms \ |
| 27 |
--limit -1 \ |
| 28 |
--sort_keys _id \ |
| 29 |
--columns[index_records].stage output \ |
| 30 |
--columns[index_records].type Memos \ |
| 31 |
--columns[index_records].flags COLUMN_VECTOR \ |
| 32 |
--columns[index_records].value 'index_column_source_records("memos")' \ |
| 33 |
--output_columns '_id, _key, index_records' |