Skip to content

Commit c757f61

Browse files
Remove query until we have a better way to show this use case (#498)
## Problem Remove query until we have a better way to show this use case. ## Solution Describe the approach you took. Link to any relevant bugs, issues, docs, or other resources. ## Type of Change - [x] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] This change requires a documentation update - [ ] Infrastructure change (CI configs, etc) - [ ] Non-code change (docs, etc) - [ ] None of the above: (explain here) ## Test Plan Describe specific steps for validating this change.
1 parent 663f0fe commit c757f61

File tree

1 file changed

+3
-40
lines changed

1 file changed

+3
-40
lines changed

docs/lexical-search.ipynb

Lines changed: 3 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -581,44 +581,7 @@
581581
},
582582
"source": [
583583
"\n",
584-
"You may get fewer than top_k results if top_k is larger than the number of sparse vectors in your index that match your query. That is, any vectors where the dotproduct score is 0 will be discarded.\n",
585-
"\n",
586-
"Searching our financial headlines for the word \"banana\" will return zero results because our data doesn't include the term \"banana\" at all. For example:"
587-
]
588-
},
589-
{
590-
"cell_type": "code",
591-
"execution_count": 84,
592-
"metadata": {
593-
"colab": {
594-
"base_uri": "https://localhost:8080/"
595-
},
596-
"id": "cEKqiufKmgL7",
597-
"outputId": "b313d8a9-6cca-47c2-ed3d-d67d74ad4097"
598-
},
599-
"outputs": [
600-
{
601-
"name": "stdout",
602-
"output_type": "stream",
603-
"text": [
604-
"No results found\n"
605-
]
606-
}
607-
],
608-
"source": [
609-
"search_query = \"banana\"\n",
610-
"\n",
611-
"results = index.search(\n",
612-
" namespace=namespace,\n",
613-
" query={\n",
614-
" \"top_k\": 10,\n",
615-
" \"inputs\": {\n",
616-
" 'text': search_query\n",
617-
" }\n",
618-
" }\n",
619-
")\n",
620-
"\n",
621-
"print_hits(results)"
584+
"Note: You may get fewer than top_k results if top_k is larger than the number of sparse vectors in your index that match your query. That is, any vectors where the dotproduct score is 0 will be discarded."
622585
]
623586
},
624587
{
@@ -661,7 +624,7 @@
661624
},
662625
"gpuClass": "standard",
663626
"kernelspec": {
664-
"display_name": "Python 3 (ipykernel)",
627+
"display_name": ".venv",
665628
"language": "python",
666629
"name": "python3"
667630
},
@@ -675,7 +638,7 @@
675638
"name": "python",
676639
"nbconvert_exporter": "python",
677640
"pygments_lexer": "ipython3",
678-
"version": "3.11.9"
641+
"version": "3.12.9"
679642
}
680643
},
681644
"nbformat": 4,

0 commit comments

Comments
 (0)