|
177 | 177 | "cell_type": "code", |
178 | 178 | "execution_count": 3, |
179 | 179 | "metadata": {}, |
180 | | - "outputs": [], |
| 180 | + "outputs": [ |
| 181 | + { |
| 182 | + "name": "stdout", |
| 183 | + "output_type": "stream", |
| 184 | + "text": [ |
| 185 | + "Index already exists, overwriting.\n" |
| 186 | + ] |
| 187 | + } |
| 188 | + ], |
181 | 189 | "source": [ |
182 | 190 | "from redisvl.index import SearchIndex\n", |
183 | 191 | "\n", |
|
210 | 218 | "name": "stdout", |
211 | 219 | "output_type": "stream", |
212 | 220 | "text": [ |
213 | | - "\u001b[32m11:16:09\u001b[0m \u001b[34m[RedisVL]\u001b[0m \u001b[1;30mINFO\u001b[0m Indices:\n", |
214 | | - "\u001b[32m11:16:09\u001b[0m \u001b[34m[RedisVL]\u001b[0m \u001b[1;30mINFO\u001b[0m 1. user_index\n" |
| 221 | + "\u001b[32m18:25:34\u001b[0m \u001b[34m[RedisVL]\u001b[0m \u001b[1;30mINFO\u001b[0m Indices:\n", |
| 222 | + "\u001b[32m18:25:34\u001b[0m \u001b[34m[RedisVL]\u001b[0m \u001b[1;30mINFO\u001b[0m 1. user_index\n" |
215 | 223 | ] |
216 | 224 | } |
217 | 225 | ], |
|
271 | 279 | "name": "stdout", |
272 | 280 | "output_type": "stream", |
273 | 281 | "text": [ |
274 | | - "['user:bb34a7ba16f541679b6219ca8d1cf369', 'user:04d6f8b805dd45c4b83616272e08898c', 'user:5ccee56134bd460cbfaf9fa492633ba5']\n" |
| 282 | + "['user:31d4f3c73f1a4c26b41cf0e2b8e0248a', 'user:c9ff740437064b919245e49ef585484d', 'user:6db5f2e09f08438785b73d8048d5350b']\n" |
275 | 283 | ] |
276 | 284 | } |
277 | 285 | ], |
|
338 | 346 | "name": "stdout", |
339 | 347 | "output_type": "stream", |
340 | 348 | "text": [ |
341 | | - "['user:056675110eba40009886b4c7a186b91f']\n" |
| 349 | + "['user:054a3091bd99457f826f3278f4a0dc98']\n" |
342 | 350 | ] |
343 | 351 | } |
344 | 352 | ], |
|
373 | 381 | "outputs": [], |
374 | 382 | "source": [ |
375 | 383 | "from redisvl.query import VectorQuery\n", |
376 | | - "from redisvl.utils.utils import result_print\n", |
377 | | - "\n", |
| 384 | + "from jupyterutils import result_print\n", |
378 | 385 | "\n", |
379 | 386 | "query = VectorQuery(\n", |
380 | 387 | " vector=[0.1, 0.1, 0.5],\n", |
|
608 | 615 | { |
609 | 616 | "data": { |
610 | 617 | "text/html": [ |
611 | | - "<table><tr><th>vector_distance</th><th>user</th><th>age</th><th>job</th><th>credit_score</th></tr><tr><td>0</td><td>mary</td><td>2</td><td>doctor</td><td>low</td></tr><tr><td>0</td><td>john</td><td>1</td><td>engineer</td><td>high</td></tr><tr><td>0.0566299557686</td><td>tyler</td><td>9</td><td>engineer</td><td>high</td></tr></table>" |
| 618 | + "<table><tr><th>vector_distance</th><th>user</th><th>age</th><th>job</th><th>credit_score</th></tr><tr><td>0</td><td>john</td><td>1</td><td>engineer</td><td>high</td></tr><tr><td>0</td><td>mary</td><td>2</td><td>doctor</td><td>low</td></tr><tr><td>0.0566299557686</td><td>tyler</td><td>9</td><td>engineer</td><td>high</td></tr></table>" |
612 | 619 | ], |
613 | 620 | "text/plain": [ |
614 | 621 | "<IPython.core.display.HTML object>" |
|
656 | 663 | "│ bytes_per_record_avg │ 1 │\n", |
657 | 664 | "│ doc_table_size_mb │ 0.000400543 │\n", |
658 | 665 | "│ inverted_sz_mb │ 1.52588e-05 │\n", |
659 | | - "│ key_table_size_mb │ 0.000165939 │\n", |
| 666 | + "│ key_table_size_mb │ 0.000138283 │\n", |
660 | 667 | "│ offset_bits_per_record_avg │ nan │\n", |
661 | 668 | "│ offset_vectors_sz_mb │ 0 │\n", |
662 | 669 | "│ offsets_per_term_avg │ 0 │\n", |
663 | 670 | "│ records_per_doc_avg │ 4 │\n", |
664 | 671 | "│ sortable_values_size_mb │ 0 │\n", |
665 | | - "│ total_indexing_time │ 0.822 │\n", |
| 672 | + "│ total_indexing_time │ 0.664 │\n", |
666 | 673 | "│ total_inverted_index_blocks │ 7 │\n", |
667 | | - "│ vector_index_sz_mb │ 0.235603 │\n", |
| 674 | + "│ vector_index_sz_mb │ 0.17852 │\n", |
668 | 675 | "╰─────────────────────────────┴─────────────╯\n" |
669 | 676 | ] |
670 | 677 | } |
|
707 | 714 | "name": "python", |
708 | 715 | "nbconvert_exporter": "python", |
709 | 716 | "pygments_lexer": "ipython3", |
710 | | - "version": "3.9.12" |
| 717 | + "version": "3.10.6" |
711 | 718 | }, |
712 | 719 | "orig_nbformat": 4, |
713 | 720 | "vscode": { |
|
0 commit comments