Skip to content

Commit eda2b52

Browse files
committed
Added some more comments to explain a difference between search functions
1 parent af556d3 commit eda2b52

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

search/search_template2.ipynb

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,8 @@
178178
"metadata": {},
179179
"outputs": [],
180180
"source": [
181-
"# Read data using scan helper\n",
181+
"# Read data using scan helper function.\n",
182+
"# Does not provide a scroll id, so cannot be resumed if search fails midway.\n",
182183
"df = cs.read_data_with_scan(index=[], query=search_query, include_fields=columns)\n",
183184
"print(df)"
184185
]
@@ -189,7 +190,8 @@
189190
"metadata": {},
190191
"outputs": [],
191192
"source": [
192-
"# Read data with scroll API and get scroll id if search fails midway.\n",
193+
"# Read data with scroll API and get scroll id if search fails midway. \n",
194+
"# Can be used to resume the search from the failed scroll id.\n",
193195
"df = cs.read_data_with_scroll(index=[], query=search_query, include_fields=columns)\n",
194196
"print(df)"
195197
]
@@ -201,6 +203,7 @@
201203
"outputs": [],
202204
"source": [
203205
"# Read data with sorting and get search_after value if search fails midway.\n",
206+
"# Can be used to resume the search from the failed search_after value but can be slower than scan or scroll methods for large datasets.\n",
204207
"# Note: Sorting requires a field to sort by, which should be present in the index. Default sorting is by _id.\n",
205208
"df = cs.read_data_with_sorting(index=[], query=search_query, \n",
206209
" include_fields=columns)\n",

0 commit comments

Comments
 (0)