| 1 |
table_create Tags TABLE_HASH_KEY ShortText |
| 2 |
[[0,0.0,0.0],true] |
| 3 |
table_create Users TABLE_HASH_KEY ShortText |
| 4 |
[[0,0.0,0.0],true] |
| 5 |
column_create Users comment COLUMN_SCALAR ShortText |
| 6 |
[[0,0.0,0.0],true] |
| 7 |
column_create Users tags_by_me COLUMN_VECTOR Tags |
| 8 |
[[0,0.0,0.0],true] |
| 9 |
column_create Users tags_by_others COLUMN_VECTOR Tags |
| 10 |
[[0,0.0,0.0],true] |
| 11 |
load --table Users |
| 12 |
[ |
| 13 |
{"_key": "Alice", |
| 14 |
"tags_by_me": ["beginner", "active"], |
| 15 |
"tags_by_others": ["expert", "active"]}, |
| 16 |
{"_key": "Bob", |
| 17 |
"tags_by_me": ["expert", "passive"], |
| 18 |
"tags_by_others": ["beginner", "passive"]}, |
| 19 |
{"_key": "Chris", |
| 20 |
"tags_by_me": ["beginner", "passive"], |
| 21 |
"tags_by_others": ["active"]} |
| 22 |
] |
| 23 |
[[0,0.0,0.0],3] |
| 24 |
column_create Tags users COLUMN_INDEX|WITH_SECTION Users tags_by_me,tags_by_others |
| 25 |
[[0,0.0,0.0],true] |
| 26 |
select Users --output_columns _id,_key,tags_by_me,tags_by_others,,_score --sort_keys _id --filter 'query_parallel_or("tags_by_me * 100 || tags_by_others * 1000", "beginner active")' |
| 27 |
[ |
| 28 |
[ |
| 29 |
0, |
| 30 |
0.0, |
| 31 |
0.0 |
| 32 |
], |
| 33 |
[ |
| 34 |
[ |
| 35 |
[ |
| 36 |
2 |
| 37 |
], |
| 38 |
[ |
| 39 |
[ |
| 40 |
"_id", |
| 41 |
"UInt32" |
| 42 |
], |
| 43 |
[ |
| 44 |
"_key", |
| 45 |
"ShortText" |
| 46 |
], |
| 47 |
[ |
| 48 |
"tags_by_me", |
| 49 |
"Tags" |
| 50 |
], |
| 51 |
[ |
| 52 |
"tags_by_others", |
| 53 |
"Tags" |
| 54 |
], |
| 55 |
[ |
| 56 |
"_score", |
| 57 |
"Int32" |
| 58 |
] |
| 59 |
], |
| 60 |
[ |
| 61 |
1, |
| 62 |
"Alice", |
| 63 |
[ |
| 64 |
"beginner", |
| 65 |
"active" |
| 66 |
], |
| 67 |
[ |
| 68 |
"expert", |
| 69 |
"active" |
| 70 |
], |
| 71 |
1200 |
| 72 |
], |
| 73 |
[ |
| 74 |
3, |
| 75 |
"Chris", |
| 76 |
[ |
| 77 |
"beginner", |
| 78 |
"passive" |
| 79 |
], |
| 80 |
[ |
| 81 |
"active" |
| 82 |
], |
| 83 |
1100 |
| 84 |
] |
| 85 |
] |
| 86 |
] |
| 87 |
] |