| 1 |
plugin_register functions/index_column |
| 2 |
[[0,0.0,0.0],true] |
| 3 |
table_create Terms TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerAuto |
| 4 |
[[0,0.0,0.0],true] |
| 5 |
table_create Memos TABLE_HASH_KEY ShortText |
| 6 |
[[0,0.0,0.0],true] |
| 7 |
column_create Memos tags COLUMN_VECTOR ShortText |
| 8 |
[[0,0.0,0.0],true] |
| 9 |
column_create Terms memos COLUMN_INDEX|WITH_POSITION|WITH_SECTION Memos tags |
| 10 |
[[0,0.0,0.0],true] |
| 11 |
load --table Memos |
| 12 |
[ |
| 13 |
{ |
| 14 |
"_key": "Groonga", |
| 15 |
"tags": ["groonga", "full-text-search"] |
| 16 |
} |
| 17 |
] |
| 18 |
[[0,0.0,0.0],1] |
| 19 |
delete --table Memos --filter true |
| 20 |
[[0,0.0,0.0],true] |
| 21 |
select Memos |
| 22 |
[ |
| 23 |
[ |
| 24 |
0, |
| 25 |
0.0, |
| 26 |
0.0 |
| 27 |
], |
| 28 |
[ |
| 29 |
[ |
| 30 |
[ |
| 31 |
0 |
| 32 |
], |
| 33 |
[ |
| 34 |
[ |
| 35 |
"_id", |
| 36 |
"UInt32" |
| 37 |
], |
| 38 |
[ |
| 39 |
"_key", |
| 40 |
"ShortText" |
| 41 |
], |
| 42 |
[ |
| 43 |
"tags", |
| 44 |
"ShortText" |
| 45 |
] |
| 46 |
] |
| 47 |
] |
| 48 |
] |
| 49 |
] |
| 50 |
select Terms --limit -1 --sort_keys _id --columns[index_records].stage output --columns[index_records].type Memos --columns[index_records].flags COLUMN_VECTOR --columns[index_records].value 'index_column_source_records("memos")' --output_columns '_id, _key, index_records' |
| 51 |
[ |
| 52 |
[ |
| 53 |
0, |
| 54 |
0.0, |
| 55 |
0.0 |
| 56 |
], |
| 57 |
[ |
| 58 |
[ |
| 59 |
[ |
| 60 |
5 |
| 61 |
], |
| 62 |
[ |
| 63 |
[ |
| 64 |
"_id", |
| 65 |
"UInt32" |
| 66 |
], |
| 67 |
[ |
| 68 |
"_key", |
| 69 |
"ShortText" |
| 70 |
], |
| 71 |
[ |
| 72 |
"index_records", |
| 73 |
"Memos" |
| 74 |
] |
| 75 |
], |
| 76 |
[ |
| 77 |
1, |
| 78 |
"groonga", |
| 79 |
[] |
| 80 |
], |
| 81 |
[ |
| 82 |
2, |
| 83 |
"full", |
| 84 |
[] |
| 85 |
], |
| 86 |
[ |
| 87 |
3, |
| 88 |
"-", |
| 89 |
[] |
| 90 |
], |
| 91 |
[ |
| 92 |
4, |
| 93 |
"text", |
| 94 |
[] |
| 95 |
], |
| 96 |
[ |
| 97 |
5, |
| 98 |
"search", |
| 99 |
[] |
| 100 |
] |
| 101 |
] |
| 102 |
] |
| 103 |
] |