RousselTMLEARNING

TP · OpenSearch: from discovery to expertise

Lab: Install OpenSearch, index and search

What you will learn in this TP
  • Start OpenSearch
  • Declare types
  • Search and aggregate
Mode :

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. 1. Start the stack

    Why? Without a strong password, OpenSearch refuses to start.

    Write .env and the Compose file, set vm.max_map_count, then check cluster state.
  2. 2. Declare an index template

    Why? A field type cannot change after the first write.

    Create a template for logs-app-*.
  3. 3. Index in batches

    Why? _bulk is the normal path for data.

    Index three documents, then read the errors field of the response.
  4. 4. Search and aggregate

    Why? filter is faster than must when the score does not matter.

    Search “banque” in the paiement service, then compute the p95 duration per service.
  5. 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 at http://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

  • ⏱ Estimated time : ≈ 45 min

Sign in to track your progress and take notes. Sign in

⭐ Rate this lesson

5.0 initial rating from the teaching team

Sign in to rate this lesson →

💬 Questions about this lesson

No questions yet: be the first to ask for help or share your configuration.

Ask a question about this lesson →

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...

Support us

♥ SUPPORT US

Support RousselTM Learning

Courses, articles, labs and certificates stay free with no intrusive ads. A voluntary contribution, of any amount you choose, pays for hosting, lab environments and new content.

Contribute with PayPal Any amount · card or PayPal accountLearn more
QR code PayPal
Or scan this QR code with your phone

Thank you, every contribution counts!