Skip to content

Commit 2ce005e

Browse files
committed
Add search notebooks readme
1 parent 1727524 commit 2ce005e

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

notebooks/search/README.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Search notebooks
2+
3+
This folder contains a number of notebooks that demonstrate the fundamentals of Elasticsearch, like indexing embeddings, running lexical, semantic and _hybrid_ searches, and more.
4+
5+
## Notebooks
6+
7+
### [Quick start](./00-quick-start.ipynb)
8+
9+
Learn how to:
10+
11+
- Use the Elasticsearch Python client for various operations.
12+
- Create and define an index for a sample dataset with `dense_vector` fields.
13+
- Transform book titles into embeddings using [Sentence Transformers](https://www.sbert.net) and index them into Elasticsearch.
14+
- Perform k-nearest neighbors (knn) semantic searches.
15+
- Integrate traditional text-based search with semantic search, for a hybrid search system.
16+
- Use reciprocal rank fusion (RRF) to intelligently combine search results from different retrieval systems.
17+
18+
### [Keyword, querying, filtering](./01-keyword-querying-filtering.ipynb)
19+
20+
In this notebook, you'll learn how to:
21+
22+
- Use [query and filter contexts](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-filter-context.html) to search and filter documents in Elasticsearch.
23+
- Execute full-text searches with `match` and `multi-match` queries.
24+
- Query and filter documents based on `text`, `number`, `date`, or `boolean` values.
25+
- Run multi-field searches using the `multi-match` query.
26+
- Prioritize specific fields in the `multi-match` query for tailored results.
27+
28+
29+
### [Hybrid search](./02-hybrid-search.ipynb)
30+
31+
In this notebook, you'll learn how to:
32+
33+
- Combine results of traditional text-based search with semantic search, for a hybrid search system.
34+
- Transform fields in the sample dataset into embeddings using the Sentence Transformer model and index them into Elasticsearch.
35+
- Use the [RRF API](https://www.elastic.co/guide/en/elasticsearch/reference/current/rrf.html#rrf-api) to combine the results of a `match` query and a `kNN` semantic search.
36+
- Walk through a super simple toy example that demonstrates, step by step, how RRF ranking works.
37+
38+
### [Semantic search with ELSER](./03-ELSER.ipynb)
39+
40+
In this notebook, you'll learn how to:
41+
42+
- Use the Elastic Learned Sparse Encoder (ELSER) for text expansion-powered semantic search, out of the box — without training, fine-tuning, or embeddings generation.
43+
- Download and deploy the ELSER model in your Elastic environment.
44+
- Create an Elasticsearch index named `search-movies` with specific mappings and index a dataset of movie descriptions.
45+
- Create an ingest pipeline containing an inference processor for ELSER model execution.
46+
- Reindex the data from `search-movies` into another index, `elser-movies`, using the ELSER pipeline for text expansion.
47+
- Observe the results of running the documents through the model by inspecting the additional terms it adds to documents, which enhance searchability.
48+
- Perform simple keyword searches on the `elser-movies` index to assess the impact of ELSER's text expansion.
49+
- Execute ELSER-powered semantic searches using the `text_expansion` query.

0 commit comments

Comments
 (0)