|
70 | 70 | },
|
71 | 71 | {
|
72 | 72 | "cell_type": "code",
|
73 |
| - "execution_count": 2, |
| 73 | + "execution_count": null, |
74 | 74 | "id": "WHC3hHGW-wbI",
|
75 | 75 | "metadata": {
|
76 | 76 | "id": "WHC3hHGW-wbI"
|
|
96 | 96 | },
|
97 | 97 | {
|
98 | 98 | "cell_type": "code",
|
99 |
| - "execution_count": 3, |
| 99 | + "execution_count": null, |
100 | 100 | "id": "f38e0397",
|
101 | 101 | "metadata": {
|
102 | 102 | "colab": {
|
|
137 | 137 | },
|
138 | 138 | {
|
139 | 139 | "cell_type": "markdown",
|
140 |
| - "id": "1462ebd8", |
141 |
| - "metadata": { |
142 |
| - "id": "1462ebd8" |
143 |
| - }, |
| 140 | + "id": "cb6ad7e9-0636-4cf3-a803-bf160fe16b33", |
| 141 | + "metadata": {}, |
144 | 142 | "source": [
|
145 |
| - "Confirm that the client has connected with this test." |
| 143 | + "### Enable Telemetry\n", |
| 144 | + "\n", |
| 145 | + "Knowing that you are using this notebook helps us decide where to invest our efforts to improve our products. We would like to ask you that you run the following code to let us gather anonymous usage statistics. See [telemetry.py](https://github.com/elastic/elasticsearch-labs/blob/main/telemetry/telemetry.py) for details. Thank you!" |
146 | 146 | ]
|
147 | 147 | },
|
148 | 148 | {
|
149 | 149 | "cell_type": "code",
|
150 |
| - "execution_count": 10, |
| 150 | + "execution_count": null, |
| 151 | + "id": "3b04f442-729d-406d-b826-654483498df6", |
| 152 | + "metadata": {}, |
| 153 | + "outputs": [], |
| 154 | + "source": [ |
| 155 | + "!curl -O -s https://raw.githubusercontent.com/elastic/elasticsearch-labs/main/telemetry/telemetry.py\n", |
| 156 | + "from telemetry import enable_telemetry\n", |
| 157 | + "\n", |
| 158 | + "client = enable_telemetry(client, \"00-quick-start\")" |
| 159 | + ] |
| 160 | + }, |
| 161 | + { |
| 162 | + "cell_type": "markdown", |
| 163 | + "id": "d12b707c-e89d-4b43-bee5-edb1beb84839", |
| 164 | + "metadata": {}, |
| 165 | + "source": [ |
| 166 | + "### Test the Client\n", |
| 167 | + "Before you continue, confirm that the client has connected with this test." |
| 168 | + ] |
| 169 | + }, |
| 170 | + { |
| 171 | + "cell_type": "code", |
| 172 | + "execution_count": 8, |
151 | 173 | "id": "25c618eb",
|
152 | 174 | "metadata": {
|
153 | 175 | "colab": {
|
|
161 | 183 | "name": "stdout",
|
162 | 184 | "output_type": "stream",
|
163 | 185 | "text": [
|
164 |
| - "{'name': 'instance-0000000011', 'cluster_name': 'd1bd36862ce54c7b903e2aacd4cd7f0a', 'cluster_uuid': 'tIkh0X_UQKmMFQKSfUw-VQ', 'version': {'number': '8.9.0', 'build_flavor': 'default', 'build_type': 'docker', 'build_hash': '8aa461beb06aa0417a231c345a1b8c38fb498a0d', 'build_date': '2023-07-19T14:43:58.555259655Z', 'build_snapshot': False, 'lucene_version': '9.7.0', 'minimum_wire_compatibility_version': '7.17.0', 'minimum_index_compatibility_version': '7.0.0'}, 'tagline': 'You Know, for Search'}\n" |
| 186 | + "{'name': 'instance-0000000000', 'cluster_name': 'a72482be54904952ba46d53c3def7740', 'cluster_uuid': 'g8BE52TtT32pGBbRzP_oKA', 'version': {'number': '8.12.2', 'build_flavor': 'default', 'build_type': 'docker', 'build_hash': '48a287ab9497e852de30327444b0809e55d46466', 'build_date': '2024-02-19T10:04:32.774273190Z', 'build_snapshot': False, 'lucene_version': '9.9.2', 'minimum_wire_compatibility_version': '7.17.0', 'minimum_index_compatibility_version': '7.0.0'}, 'tagline': 'You Know, for Search'}\n" |
165 | 187 | ]
|
166 | 188 | }
|
167 | 189 | ],
|
|
195 | 217 | },
|
196 | 218 | {
|
197 | 219 | "cell_type": "code",
|
198 |
| - "execution_count": 5, |
| 220 | + "execution_count": 9, |
199 | 221 | "id": "_OAahfg-tqrf",
|
200 | 222 | "metadata": {
|
201 | 223 | "colab": {
|
|
211 | 233 | "ObjectApiResponse({'acknowledged': True})"
|
212 | 234 | ]
|
213 | 235 | },
|
214 |
| - "execution_count": 5, |
| 236 | + "execution_count": 9, |
215 | 237 | "metadata": {},
|
216 | 238 | "output_type": "execute_result"
|
217 | 239 | }
|
|
232 | 254 | },
|
233 | 255 | {
|
234 | 256 | "cell_type": "code",
|
235 |
| - "execution_count": 11, |
| 257 | + "execution_count": 10, |
236 | 258 | "id": "6bc95238",
|
237 | 259 | "metadata": {
|
238 | 260 | "id": "6bc95238"
|
|
244 | 266 | "ObjectApiResponse({'acknowledged': True, 'shards_acknowledged': True, 'index': 'book_index'})"
|
245 | 267 | ]
|
246 | 268 | },
|
247 |
| - "execution_count": 11, |
| 269 | + "execution_count": 10, |
248 | 270 | "metadata": {},
|
249 | 271 | "output_type": "execute_result"
|
250 | 272 | }
|
|
281 | 303 | },
|
282 | 304 | {
|
283 | 305 | "cell_type": "code",
|
284 |
| - "execution_count": 12, |
| 306 | + "execution_count": 13, |
285 | 307 | "id": "008d723e",
|
286 | 308 | "metadata": {
|
287 | 309 | "id": "008d723e"
|
|
290 | 312 | {
|
291 | 313 | "data": {
|
292 | 314 | "text/plain": [
|
293 |
| - "ObjectApiResponse({'took': 49, 'errors': False, 'items': [{'index': {'_index': 'book_index', '_id': 'HwOa7osBiUNHLMdf3q2r', '_version': 1, 'result': 'created', 'forced_refresh': True, '_shards': {'total': 2, 'successful': 1, 'failed': 0}, '_seq_no': 0, '_primary_term': 1, 'status': 201}}, {'index': {'_index': 'book_index', '_id': 'IAOa7osBiUNHLMdf3q2r', '_version': 1, 'result': 'created', 'forced_refresh': True, '_shards': {'total': 2, 'successful': 1, 'failed': 0}, '_seq_no': 1, '_primary_term': 1, 'status': 201}}, {'index': {'_index': 'book_index', '_id': 'IQOa7osBiUNHLMdf3q2r', '_version': 1, 'result': 'created', 'forced_refresh': True, '_shards': {'total': 2, 'successful': 1, 'failed': 0}, '_seq_no': 2, '_primary_term': 1, 'status': 201}}, {'index': {'_index': 'book_index', '_id': 'IgOa7osBiUNHLMdf3q2r', '_version': 1, 'result': 'created', 'forced_refresh': True, '_shards': {'total': 2, 'successful': 1, 'failed': 0}, '_seq_no': 3, '_primary_term': 1, 'status': 201}}, {'index': {'_index': 'book_index', '_id': 'IwOa7osBiUNHLMdf3q2r', '_version': 1, 'result': 'created', 'forced_refresh': True, '_shards': {'total': 2, 'successful': 1, 'failed': 0}, '_seq_no': 4, '_primary_term': 1, 'status': 201}}, {'index': {'_index': 'book_index', '_id': 'JAOa7osBiUNHLMdf3q2r', '_version': 1, 'result': 'created', 'forced_refresh': True, '_shards': {'total': 2, 'successful': 1, 'failed': 0}, '_seq_no': 5, '_primary_term': 1, 'status': 201}}, {'index': {'_index': 'book_index', '_id': 'JQOa7osBiUNHLMdf3q2r', '_version': 1, 'result': 'created', 'forced_refresh': True, '_shards': {'total': 2, 'successful': 1, 'failed': 0}, '_seq_no': 6, '_primary_term': 1, 'status': 201}}, {'index': {'_index': 'book_index', '_id': 'JgOa7osBiUNHLMdf3q2r', '_version': 1, 'result': 'created', 'forced_refresh': True, '_shards': {'total': 2, 'successful': 1, 'failed': 0}, '_seq_no': 7, '_primary_term': 1, 'status': 201}}, {'index': {'_index': 'book_index', '_id': 'JwOa7osBiUNHLMdf3q2r', '_version': 1, 'result': 'created', 'forced_refresh': True, '_shards': {'total': 2, 'successful': 1, 'failed': 0}, '_seq_no': 8, '_primary_term': 1, 'status': 201}}, {'index': {'_index': 'book_index', '_id': 'KAOa7osBiUNHLMdf3q2r', '_version': 1, 'result': 'created', 'forced_refresh': True, '_shards': {'total': 2, 'successful': 1, 'failed': 0}, '_seq_no': 9, '_primary_term': 1, 'status': 201}}]})" |
| 315 | + "ObjectApiResponse({'errors': False, 'took': 88, 'items': [{'index': {'_index': 'book_index', '_id': 'caRpvY4BKY8PuI1qPluy', '_version': 1, 'result': 'created', 'forced_refresh': True, '_shards': {'total': 2, 'successful': 2, 'failed': 0}, '_seq_no': 0, '_primary_term': 1, 'status': 201}}, {'index': {'_index': 'book_index', '_id': 'cqRpvY4BKY8PuI1qPluy', '_version': 1, 'result': 'created', 'forced_refresh': True, '_shards': {'total': 2, 'successful': 2, 'failed': 0}, '_seq_no': 1, '_primary_term': 1, 'status': 201}}, {'index': {'_index': 'book_index', '_id': 'c6RpvY4BKY8PuI1qPluy', '_version': 1, 'result': 'created', 'forced_refresh': True, '_shards': {'total': 2, 'successful': 2, 'failed': 0}, '_seq_no': 2, '_primary_term': 1, 'status': 201}}, {'index': {'_index': 'book_index', '_id': 'dKRpvY4BKY8PuI1qPluy', '_version': 1, 'result': 'created', 'forced_refresh': True, '_shards': {'total': 2, 'successful': 2, 'failed': 0}, '_seq_no': 3, '_primary_term': 1, 'status': 201}}, {'index': {'_index': 'book_index', '_id': 'daRpvY4BKY8PuI1qPluy', '_version': 1, 'result': 'created', 'forced_refresh': True, '_shards': {'total': 2, 'successful': 2, 'failed': 0}, '_seq_no': 4, '_primary_term': 1, 'status': 201}}, {'index': {'_index': 'book_index', '_id': 'dqRpvY4BKY8PuI1qPluy', '_version': 1, 'result': 'created', 'forced_refresh': True, '_shards': {'total': 2, 'successful': 2, 'failed': 0}, '_seq_no': 5, '_primary_term': 1, 'status': 201}}, {'index': {'_index': 'book_index', '_id': 'd6RpvY4BKY8PuI1qPluy', '_version': 1, 'result': 'created', 'forced_refresh': True, '_shards': {'total': 2, 'successful': 2, 'failed': 0}, '_seq_no': 6, '_primary_term': 1, 'status': 201}}, {'index': {'_index': 'book_index', '_id': 'eKRpvY4BKY8PuI1qPluy', '_version': 1, 'result': 'created', 'forced_refresh': True, '_shards': {'total': 2, 'successful': 2, 'failed': 0}, '_seq_no': 7, '_primary_term': 1, 'status': 201}}, {'index': {'_index': 'book_index', '_id': 'eaRpvY4BKY8PuI1qPluy', '_version': 1, 'result': 'created', 'forced_refresh': True, '_shards': {'total': 2, 'successful': 2, 'failed': 0}, '_seq_no': 8, '_primary_term': 1, 'status': 201}}, {'index': {'_index': 'book_index', '_id': 'eqRpvY4BKY8PuI1qPluy', '_version': 1, 'result': 'created', 'forced_refresh': True, '_shards': {'total': 2, 'successful': 2, 'failed': 0}, '_seq_no': 9, '_primary_term': 1, 'status': 201}}]})" |
294 | 316 | ]
|
295 | 317 | },
|
296 |
| - "execution_count": 12, |
| 318 | + "execution_count": 13, |
297 | 319 | "metadata": {},
|
298 | 320 | "output_type": "execute_result"
|
299 | 321 | }
|
|
330 | 352 | },
|
331 | 353 | {
|
332 | 354 | "cell_type": "code",
|
333 |
| - "execution_count": 13, |
| 355 | + "execution_count": 14, |
334 | 356 | "id": "f12ce2c9",
|
335 | 357 | "metadata": {
|
336 | 358 | "id": "f12ce2c9"
|
|
369 | 391 | },
|
370 | 392 | {
|
371 | 393 | "cell_type": "code",
|
372 |
| - "execution_count": 14, |
| 394 | + "execution_count": 15, |
373 | 395 | "id": "Df7hwcIjYwMT",
|
374 | 396 | "metadata": {
|
375 | 397 | "colab": {
|
|
384 | 406 | "output_type": "stream",
|
385 | 407 | "text": [
|
386 | 408 | "\n",
|
387 |
| - "ID: JwOa7osBiUNHLMdf3q2r\n", |
| 409 | + "ID: eaRpvY4BKY8PuI1qPluy\n", |
388 | 410 | "Publication date: 2008-05-15\n",
|
389 | 411 | "Title: JavaScript: The Good Parts\n",
|
390 | 412 | "Summary: A deep dive into the parts of JavaScript that are essential to writing maintainable code\n",
|
391 | 413 | "Publisher: oreilly\n",
|
392 | 414 | "Reviews: 51\n",
|
393 | 415 | "Authors: ['douglas crockford']\n",
|
394 |
| - "Score: 0.80428284\n", |
| 416 | + "Score: 0.8042828\n", |
395 | 417 | "\n",
|
396 |
| - "ID: IwOa7osBiUNHLMdf3q2r\n", |
| 418 | + "ID: daRpvY4BKY8PuI1qPluy\n", |
397 | 419 | "Publication date: 2015-03-27\n",
|
398 | 420 | "Title: You Don't Know JS: Up & Going\n",
|
399 | 421 | "Summary: Introduction to JavaScript and programming as a whole\n",
|
|
402 | 424 | "Authors: ['kyle simpson']\n",
|
403 | 425 | "Score: 0.6989136\n",
|
404 | 426 | "\n",
|
405 |
| - "ID: JAOa7osBiUNHLMdf3q2r\n", |
| 427 | + "ID: dqRpvY4BKY8PuI1qPluy\n", |
406 | 428 | "Publication date: 2018-12-04\n",
|
407 | 429 | "Title: Eloquent JavaScript\n",
|
408 | 430 | "Summary: A modern introduction to programming\n",
|
|
411 | 433 | "Authors: ['marijn haverbeke']\n",
|
412 | 434 | "Score: 0.6796988\n",
|
413 | 435 | "\n",
|
414 |
| - "ID: HwOa7osBiUNHLMdf3q2r\n", |
| 436 | + "ID: caRpvY4BKY8PuI1qPluy\n", |
415 | 437 | "Publication date: 2019-10-29\n",
|
416 | 438 | "Title: The Pragmatic Programmer: Your Journey to Mastery\n",
|
417 | 439 | "Summary: A guide to pragmatic programming for software engineers and developers\n",
|
418 | 440 | "Publisher: addison-wesley\n",
|
419 | 441 | "Reviews: 30\n",
|
420 | 442 | "Authors: ['andrew hunt', 'david thomas']\n",
|
421 |
| - "Score: 0.62065494\n", |
| 443 | + "Score: 0.6206549\n", |
422 | 444 | "\n",
|
423 |
| - "ID: KAOa7osBiUNHLMdf3q2r\n", |
| 445 | + "ID: eqRpvY4BKY8PuI1qPluy\n", |
424 | 446 | "Publication date: 2012-06-27\n",
|
425 | 447 | "Title: Introduction to the Theory of Computation\n",
|
426 | 448 | "Summary: Introduction to the theory of computation and complexity theory\n",
|
427 | 449 | "Publisher: cengage learning\n",
|
428 | 450 | "Reviews: 33\n",
|
429 | 451 | "Authors: ['michael sipser']\n",
|
430 |
| - "Score: 0.6008769\n", |
| 452 | + "Score: 0.60087687\n", |
431 | 453 | "\n",
|
432 |
| - "ID: JgOa7osBiUNHLMdf3q2r\n", |
| 454 | + "ID: eKRpvY4BKY8PuI1qPluy\n", |
433 | 455 | "Publication date: 2011-05-13\n",
|
434 | 456 | "Title: The Clean Coder: A Code of Conduct for Professional Programmers\n",
|
435 | 457 | "Summary: A guide to professional conduct in the field of software engineering\n",
|
|
438 | 460 | "Authors: ['robert c. martin']\n",
|
439 | 461 | "Score: 0.571234\n",
|
440 | 462 | "\n",
|
441 |
| - "ID: JQOa7osBiUNHLMdf3q2r\n", |
| 463 | + "ID: d6RpvY4BKY8PuI1qPluy\n", |
442 | 464 | "Publication date: 1994-10-31\n",
|
443 | 465 | "Title: Design Patterns: Elements of Reusable Object-Oriented Software\n",
|
444 | 466 | "Summary: Guide to design patterns that can be used in any object-oriented language\n",
|
|
447 | 469 | "Authors: ['erich gamma', 'richard helm', 'ralph johnson', 'john vlissides']\n",
|
448 | 470 | "Score: 0.56499225\n",
|
449 | 471 | "\n",
|
450 |
| - "ID: IQOa7osBiUNHLMdf3q2r\n", |
| 472 | + "ID: c6RpvY4BKY8PuI1qPluy\n", |
451 | 473 | "Publication date: 2020-04-06\n",
|
452 | 474 | "Title: Artificial Intelligence: A Modern Approach\n",
|
453 | 475 | "Summary: Comprehensive introduction to the theory and practice of artificial intelligence\n",
|
454 | 476 | "Publisher: pearson\n",
|
455 | 477 | "Reviews: 39\n",
|
456 | 478 | "Authors: ['stuart russell', 'peter norvig']\n",
|
457 |
| - "Score: 0.56054837\n", |
| 479 | + "Score: 0.5605484\n", |
458 | 480 | "\n",
|
459 |
| - "ID: IgOa7osBiUNHLMdf3q2r\n", |
| 481 | + "ID: dKRpvY4BKY8PuI1qPluy\n", |
460 | 482 | "Publication date: 2008-08-11\n",
|
461 | 483 | "Title: Clean Code: A Handbook of Agile Software Craftsmanship\n",
|
462 | 484 | "Summary: A guide to writing code that is easy to read, understand and maintain\n",
|
463 | 485 | "Publisher: prentice hall\n",
|
464 | 486 | "Reviews: 55\n",
|
465 | 487 | "Authors: ['robert c. martin']\n",
|
466 |
| - "Score: 0.54226947\n", |
| 488 | + "Score: 0.5422694\n", |
467 | 489 | "\n",
|
468 |
| - "ID: IAOa7osBiUNHLMdf3q2r\n", |
| 490 | + "ID: cqRpvY4BKY8PuI1qPluy\n", |
469 | 491 | "Publication date: 2019-05-03\n",
|
470 | 492 | "Title: Python Crash Course\n",
|
471 | 493 | "Summary: A fast-paced, no-nonsense guide to programming in Python\n",
|
472 | 494 | "Publisher: no starch press\n",
|
473 | 495 | "Reviews: 42\n",
|
474 | 496 | "Authors: ['eric matthes']\n",
|
475 |
| - "Score: 0.5254088\n" |
| 497 | + "Score: 0.52540874\n" |
476 | 498 | ]
|
477 | 499 | }
|
478 | 500 | ],
|
|
525 | 547 | },
|
526 | 548 | {
|
527 | 549 | "cell_type": "code",
|
528 |
| - "execution_count": 15, |
| 550 | + "execution_count": 16, |
529 | 551 | "id": "WoE0yTchfj3A",
|
530 | 552 | "metadata": {
|
531 | 553 | "id": "WoE0yTchfj3A"
|
|
536 | 558 | "output_type": "stream",
|
537 | 559 | "text": [
|
538 | 560 | "\n",
|
539 |
| - "ID: HwOa7osBiUNHLMdf3q2r\n", |
| 561 | + "ID: caRpvY4BKY8PuI1qPluy\n", |
540 | 562 | "Publication date: 2019-10-29\n",
|
541 | 563 | "Title: The Pragmatic Programmer: Your Journey to Mastery\n",
|
542 | 564 | "Summary: A guide to pragmatic programming for software engineers and developers\n",
|
543 | 565 | "Publisher: addison-wesley\n",
|
544 | 566 | "Reviews: 30\n",
|
545 | 567 | "Authors: ['andrew hunt', 'david thomas']\n",
|
546 |
| - "Score: 0.62065494\n", |
| 568 | + "Score: 0.6206549\n", |
547 | 569 | "\n",
|
548 |
| - "ID: JQOa7osBiUNHLMdf3q2r\n", |
| 570 | + "ID: d6RpvY4BKY8PuI1qPluy\n", |
549 | 571 | "Publication date: 1994-10-31\n",
|
550 | 572 | "Title: Design Patterns: Elements of Reusable Object-Oriented Software\n",
|
551 | 573 | "Summary: Guide to design patterns that can be used in any object-oriented language\n",
|
|
570 | 592 | "\n",
|
571 | 593 | "pretty_response(response)"
|
572 | 594 | ]
|
| 595 | + }, |
| 596 | + { |
| 597 | + "cell_type": "code", |
| 598 | + "execution_count": null, |
| 599 | + "id": "d9edaa20-b8e8-4ce4-99b1-58b81de29dd5", |
| 600 | + "metadata": {}, |
| 601 | + "outputs": [], |
| 602 | + "source": [] |
573 | 603 | }
|
574 | 604 | ],
|
575 | 605 | "metadata": {
|
|
591 | 621 | "name": "python",
|
592 | 622 | "nbconvert_exporter": "python",
|
593 | 623 | "pygments_lexer": "ipython3",
|
594 |
| - "version": "3.10.3" |
| 624 | + "version": "3.10.13" |
595 | 625 | }
|
596 | 626 | },
|
597 | 627 | "nbformat": 4,
|
|
0 commit comments