|
16 | 16 | }, |
17 | 17 | { |
18 | 18 | "cell_type": "code", |
19 | | - "execution_count": 6, |
| 19 | + "execution_count": 1, |
20 | 20 | "metadata": {}, |
21 | 21 | "outputs": [ |
22 | 22 | { |
|
43 | 43 | }, |
44 | 44 | { |
45 | 45 | "cell_type": "code", |
46 | | - "execution_count": 1, |
| 46 | + "execution_count": 2, |
47 | 47 | "metadata": {}, |
48 | 48 | "outputs": [], |
49 | 49 | "source": [ |
|
77 | 77 | }, |
78 | 78 | { |
79 | 79 | "cell_type": "code", |
80 | | - "execution_count": 2, |
| 80 | + "execution_count": 3, |
81 | 81 | "metadata": {}, |
82 | 82 | "outputs": [ |
83 | 83 | { |
84 | 84 | "name": "stdout", |
85 | 85 | "output_type": "stream", |
86 | 86 | "text": [ |
87 | | - "13:53:37 redisvl.index.index INFO Index already exists, overwriting.\n" |
| 87 | + "11:40:25 redisvl.index.index INFO Index already exists, overwriting.\n" |
88 | 88 | ] |
89 | 89 | } |
90 | 90 | ], |
|
100 | 100 | }, |
101 | 101 | { |
102 | 102 | "cell_type": "code", |
103 | | - "execution_count": 3, |
| 103 | + "execution_count": 27, |
104 | 104 | "metadata": {}, |
105 | 105 | "outputs": [ |
106 | 106 | { |
107 | 107 | "name": "stdout", |
108 | 108 | "output_type": "stream", |
109 | 109 | "text": [ |
110 | | - "\u001b[32m13:53:42\u001b[0m \u001b[34m[RedisVL]\u001b[0m \u001b[1;30mINFO\u001b[0m Indices:\n", |
111 | | - "\u001b[32m13:53:42\u001b[0m \u001b[34m[RedisVL]\u001b[0m \u001b[1;30mINFO\u001b[0m 1. user_queries\n" |
| 110 | + "\u001b[32m11:03:03\u001b[0m \u001b[34m[RedisVL]\u001b[0m \u001b[1;30mINFO\u001b[0m Indices:\n", |
| 111 | + "\u001b[32m11:03:03\u001b[0m \u001b[34m[RedisVL]\u001b[0m \u001b[1;30mINFO\u001b[0m 1. float64_session\n", |
| 112 | + "\u001b[32m11:03:03\u001b[0m \u001b[34m[RedisVL]\u001b[0m \u001b[1;30mINFO\u001b[0m 2. float64_cache\n", |
| 113 | + "\u001b[32m11:03:03\u001b[0m \u001b[34m[RedisVL]\u001b[0m \u001b[1;30mINFO\u001b[0m 3. float16_cache\n", |
| 114 | + "\u001b[32m11:03:03\u001b[0m \u001b[34m[RedisVL]\u001b[0m \u001b[1;30mINFO\u001b[0m 4. float32_session\n", |
| 115 | + "\u001b[32m11:03:03\u001b[0m \u001b[34m[RedisVL]\u001b[0m \u001b[1;30mINFO\u001b[0m 5. float16_session\n", |
| 116 | + "\u001b[32m11:03:03\u001b[0m \u001b[34m[RedisVL]\u001b[0m \u001b[1;30mINFO\u001b[0m 6. bfloat_session\n", |
| 117 | + "\u001b[32m11:03:03\u001b[0m \u001b[34m[RedisVL]\u001b[0m \u001b[1;30mINFO\u001b[0m 7. float32_cache\n", |
| 118 | + "\u001b[32m11:03:03\u001b[0m \u001b[34m[RedisVL]\u001b[0m \u001b[1;30mINFO\u001b[0m 8. bfloat_cache\n", |
| 119 | + "\u001b[32m11:03:03\u001b[0m \u001b[34m[RedisVL]\u001b[0m \u001b[1;30mINFO\u001b[0m 9. user_queries\n" |
112 | 120 | ] |
113 | 121 | } |
114 | 122 | ], |
|
119 | 127 | }, |
120 | 128 | { |
121 | 129 | "cell_type": "code", |
122 | | - "execution_count": 8, |
| 130 | + "execution_count": 28, |
123 | 131 | "metadata": {}, |
124 | 132 | "outputs": [], |
125 | 133 | "source": [ |
|
168 | 176 | }, |
169 | 177 | { |
170 | 178 | "cell_type": "code", |
171 | | - "execution_count": 21, |
| 179 | + "execution_count": 5, |
172 | 180 | "metadata": {}, |
173 | 181 | "outputs": [ |
174 | 182 | { |
|
203 | 211 | }, |
204 | 212 | { |
205 | 213 | "cell_type": "code", |
206 | | - "execution_count": 7, |
| 214 | + "execution_count": 6, |
207 | 215 | "metadata": {}, |
208 | 216 | "outputs": [ |
209 | 217 | { |
210 | 218 | "data": { |
211 | 219 | "text/html": [ |
212 | | - "<table><tr><th>vector_distance</th><th>user</th><th>credit_score</th><th>age</th><th>job</th><th>office_location</th></tr><tr><td>0</td><td>derrick</td><td>low</td><td>14</td><td>doctor</td><td>-122.4194,37.7749</td></tr><tr><td>0</td><td>derrick</td><td>low</td><td>14</td><td>doctor</td><td>-122.4194,37.7749</td></tr><tr><td>0.217882037163</td><td>taimur</td><td>low</td><td>15</td><td>CEO</td><td>-122.0839,37.3861</td></tr><tr><td>0.217882037163</td><td>taimur</td><td>low</td><td>15</td><td>CEO</td><td>-122.0839,37.3861</td></tr><tr><td>0.653301358223</td><td>joe</td><td>medium</td><td>35</td><td>dentist</td><td>-122.0839,37.3861</td></tr><tr><td>0.653301358223</td><td>joe</td><td>medium</td><td>35</td><td>dentist</td><td>-122.0839,37.3861</td></tr></table>" |
| 220 | + "<table><tr><th>vector_distance</th><th>user</th><th>credit_score</th><th>age</th><th>job</th><th>office_location</th><th>last_updated</th></tr><tr><td>0</td><td>derrick</td><td>low</td><td>14</td><td>doctor</td><td>-122.4194,37.7749</td><td>1741627789</td></tr><tr><td>0.217882037163</td><td>taimur</td><td>low</td><td>15</td><td>CEO</td><td>-122.0839,37.3861</td><td>1742232589</td></tr><tr><td>0.653301358223</td><td>joe</td><td>medium</td><td>35</td><td>dentist</td><td>-122.0839,37.3861</td><td>1742232589</td></tr></table>" |
213 | 221 | ], |
214 | 222 | "text/plain": [ |
215 | 223 | "<IPython.core.display.HTML object>" |
|
327 | 335 | }, |
328 | 336 | { |
329 | 337 | "cell_type": "code", |
330 | | - "execution_count": 20, |
| 338 | + "execution_count": 6, |
331 | 339 | "metadata": {}, |
332 | 340 | "outputs": [ |
333 | 341 | { |
334 | 342 | "data": { |
335 | 343 | "text/html": [ |
336 | | - "<table><tr><th>vector_distance</th><th>user</th><th>credit_score</th><th>age</th><th>job</th><th>office_location</th><th>last_updated</th></tr><tr><td>0</td><td>john</td><td>high</td><td>18</td><td>engineer</td><td>-122.4194,37.7749</td><td>1741627789</td></tr><tr><td>0.109129190445</td><td>tyler</td><td>high</td><td>100</td><td>engineer</td><td>-122.0839,37.3861</td><td>1742232589</td></tr><tr><td>0.266666650772</td><td>nancy</td><td>high</td><td>94</td><td>doctor</td><td>-122.4194,37.7749</td><td>1710696589</td></tr><tr><td>0.653301358223</td><td>joe</td><td>medium</td><td>35</td><td>dentist</td><td>-122.0839,37.3861</td><td>1742232589</td></tr></table>" |
| 344 | + "<table><tr><th>vector_distance</th><th>user</th><th>credit_score</th><th>age</th><th>job</th><th>office_location</th><th>last_updated</th></tr><tr><td>0</td><td>john</td><td>high</td><td>18</td><td>engineer</td><td>-122.4194,37.7749</td><td>1741627789</td></tr><tr><td>0.217882037163</td><td>taimur</td><td>low</td><td>15</td><td>CEO</td><td>-122.0839,37.3861</td><td>1742232589</td></tr><tr><td>0.653301358223</td><td>joe</td><td>medium</td><td>35</td><td>dentist</td><td>-122.0839,37.3861</td><td>1742232589</td></tr></table>" |
337 | 345 | ], |
338 | 346 | "text/plain": [ |
339 | 347 | "<IPython.core.display.HTML object>" |
|
346 | 354 | "source": [ |
347 | 355 | "from redisvl.query.filter import Num\n", |
348 | 356 | "\n", |
349 | | - "numeric_filter = Num(\"age\") > 15\n", |
| 357 | + "numeric_filter = Num(\"age\").between(15, 35)\n", |
350 | 358 | "\n", |
351 | 359 | "v.set_filter(numeric_filter)\n", |
352 | 360 | "result_print(index.query(v))" |
|
0 commit comments