What you will learn in this TP
- Start OpenSearch
- Declare types
- Search and aggregate
All steps and instructions are shown. Recommended for this lab: guided
Introduction #
Context. Your team wants an Apache 2.0 log search engine. You evaluate OpenSearch on a prototype.
Prerequisites: Docker Compose, 4 GB of free memory · Estimated time: 45 min
A node and its console.Setup #
Guided steps, with their solution.
1. Start the stack
Why? Without a strong password, OpenSearch refuses to start.
Write.envand the Compose file, setvm.max_map_count, then check cluster state.2. Declare an index template
Why? A field type cannot change after the first write.
Create a template forlogs-app-*.3. Index in batches
Why?
_bulkis the normal path for data.Index three documents, then read theerrorsfield of the response.4. Search and aggregate
Why?
filteris faster thanmustwhen the score does not matter.Search “banque” in thepaiementservice, then compute the p95 duration per service.5. Try PPL and the console
Why? PPL is very readable for exploring logs.
Count documents per level with PPL, then find them in Discover athttp://localhost:5601.
Validate your work
Check that each goal above is reached and that you get the result described in the introduction.
Difficulty level : ●○○○○ (1/5)
My progress
Sign in to track your progress and take notes. Sign in
💬 Questions about this lesson
No questions yet: be the first to ask for help or share your configuration.
Recommended Articles
Installing OpenSearch and OpenSearch Dashboards
Install OpenSearch with Docker Compose or the archive: initial password, vm.max_map_count, demo c...
Indexing and searching in OpenSearch: mapping, DSL, PPL and SQL
Declare an index template, index with bulk, search with the Query DSL, aggregate and query with P...
Full-text search in OpenSearch: analyzers and relevance
Mastering full-text search: inverted index, analyzers (including French), the _analyze API, match...
Advanced aggregations, PPL and SQL in OpenSearch
Analyzing data in OpenSearch: bucket, metric and pipeline aggregations, date histograms, approxim...
Vector, semantic and hybrid search with OpenSearch
Using OpenSearch as a vector database: knn_vector fields, faiss and lucene engines, HNSW and IVF,...
Observability with OpenSearch: traces, logs and metrics
Turning OpenSearch into an observability platform: Trace Analytics and service map, PPL logs, Pro...
OpenSearch Dashboards, alerting and observability
Explore data in OpenSearch Dashboards, create alert monitors and discover Trace Analytics, Event ...
Advanced OpenSearch security: authentication, roles and audit
Securing OpenSearch in depth: transport and API TLS, internal, LDAP, OpenID Connect and SAML auth...
OpenSearch performance, sizing and troubleshooting
Sizing and optimizing an OpenSearch cluster: shard size and count, bulk indexing, refresh and tra...