Skip to content

Commit

Permalink
[Search] Update notebooks & search_notebooks readme (#180630)
Browse files Browse the repository at this point in the history
  • Loading branch information
TattdCodeMonkey authored Apr 12, 2024
1 parent 0a24e23 commit 9195b22
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
12 changes: 12 additions & 0 deletions x-pack/plugins/search_notebooks/README.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
# Search Notebooks plugin

This plugin contains endpoints and components for rendering search python notebooks in the persistent dev console.

### Cached Notebooks

There is a limited set of search notebooks that we cache in `/server/data` directory to be served from this plugin. These should be available in all environments.

To update the cached notebooks, run the following command:

```shell
./scripts/download-notebooks.sh
```

This script reads the `scripts/notebooks.txt` file and downloads each notebook from the url in the file and then saves it in the `server/data` directory with a snake_case filename and `.json` extension. The `.json` extension is just to make loading the files with node.js easier using an `async require()` instead of writing custom loading code with `fs` and implementing in-memory caching with the same loading code.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"source": [
"# Semantic search quick start\n",
"\n",
"<a target=\"_blank\" href=\"https://colab.research.google.com/github/elastic/elasticsearch-labs/blob/main/notebooks/search/00-quick-start.ipynb\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>\n",
"[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/elastic/elasticsearch-labs/blob/main/notebooks/search/00-quick-start.ipynb)\n",
"\n",
"This interactive notebook will introduce you to some basic operations with Elasticsearch, using the official [Elasticsearch Python client](https://www.elastic.co/guide/en/elasticsearch/client/python-api/current/connecting.html).\n",
"You'll perform semantic search using [Sentence Transformers](https://www.sbert.net) for text embedding. Learn how to integrate traditional text-based search with semantic search, for a hybrid search system."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"source": [
"# Keyword querying and filtering\n",
"\n",
"<a target=\"_blank\" href=\"https://colab.research.google.com/github/elasticsearch-labs/blob/main/search/01-keyword-querying-filtering.ipynb\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>\n",
"[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/elasticsearch-labs/blob/main/search/01-keyword-querying-filtering.ipynb)\n",
"\n",
"This interactive notebook will introduce you to the basic Elasticsearch queries, using the official Elasticsearch Python client. Before getting started on this section you should work through our [quick start](https://github.com/elastic/elasticsearch-labs/blob/main/notebooks/search/00-quick-start.ipynb), as you will be using the same dataset."
]
Expand Down

0 comments on commit 9195b22

Please sign in to comment.