| 1 |
plugin_register functions/vector |
| 2 |
[[0,0.0,0.0],true] |
| 3 |
table_create Memos TABLE_HASH_KEY ShortText |
| 4 |
[[0,0.0,0.0],true] |
| 5 |
column_create Memos categories COLUMN_VECTOR ShortText |
| 6 |
[[0,0.0,0.0],true] |
| 7 |
load --table Memos |
| 8 |
[ |
| 9 |
{"_key": "Groonga", "categories": ["full-text-search"]} |
| 10 |
] |
| 11 |
[[0,0.0,0.0],1] |
| 12 |
select --filter "true" --output_columns "_key, _score" --scorer "(_score = _score + (vector_size(categories) > 0))" --table "Memos" |
| 13 |
[[0,0.0,0.0],[[[1],[["_key","ShortText"],["_score","Int32"]],["Groonga",2]]]] |