×
Community Blog A Step-By-Step Guide on Using Alibaba Cloud Elasticsearch's Analytic-Search Plugin

A Step-By-Step Guide on Using Alibaba Cloud Elasticsearch's Analytic-Search Plugin

In this comprehensive tutorial, we'll uncover how to harness the full potential of the analytic-search plugin.

Elasticsearch, the powerful open-source search and analytics engine, has been an indispensable tool for developers dealing with large volumes of data. One of the key features that enhance its power significantly is the ability to extend its capabilities through plugins. And when it comes to accelerating search performance, the analytic-search plugin developed by the Alibaba Cloud Elasticsearch team is a game-changer.

In this comprehensive tutorial, we'll uncover how to harness the full potential of the analytic-search plugin, specifically tailored for Alibaba Cloud's Elasticsearch, to achieve lightning-fast query response times and heightened concurrency capabilities.

Understanding the Analytic-Search Plugin

Acceleration Features

The analytic-search plugin offers two prime capabilities to improve your Kibana Discover query speeds:

Acceleration for Unconditional and Single-Condition Queries:

  • Scenarios: Optimal for log query situations where speed is critical.
  • Benefits: Utilizes optimized index and date histogram aggregation policies.
  • Performance Gains: In tests with more than 1 TB of daily data, query times plummeted from minutes to under 5 seconds.

Concurrent Query Capability

Concurrent Queries:

  • Scenarios: Designed for low QPS with ample node computing resources.
  • Benefits: Makes use of concurrent threads, cutting average query times by half.

Environment

Alibaba Cloud Elasticsearch clusters must be running version 7.10.0 or later, with a kernel version of V1.7.0 or higher.

Putting the Acceleration Feature to Work

To leverage the acceleration feature, you'll need to set up your indices appropriately. Below is a sample configuration that you can customize to fit your needs:

PUT /your_index
{
  "settings": {
    "index.sort.field": "@timestamp",
    "index.sort.order": "desc",
    "index.points.same_sort_order_as_index_sort": true
  },
  "mappings": {
    "properties": {
      "@timestamp": {
        "type": "date",
        "format": "strict_date_optional_time||epoch_millis"
      }
    }
  }
}

This example sets the timestamp as the sorted field in descending order. Perfect for time-series data which is common in logging scenarios.

Utilizing the Concurrent Query Feature

To get started with concurrent querying, navigate to the Kibana console on your Elasticsearch cluster and access the Dev Tools section.
Here's how to activate the concurrent query feature:

PUT _cluster/settings
{
  "persistent": {
    "apack.analytic_search.doc_concurrency.enabled": "true"
  }
}

You can further refine concurrent operations using these settings (cluster and index level):

  • apack.analytic_search.doc_concurrency.concurrent.policy
  • apack.analytic_search.doc_concurrency.min_support_doc
  • index.apack.analytic_search.doc_concurrency.enabled

For a detailed description of each parameter, please refer to the official Elasticsearch plugins documentation

Start Your Elasticsearch Adventure

Alibaba Cloud Elasticsearch not only provides a robust infrastructure but also unparalleled convenience with plugins like analytic-search. Ready to start your journey with Elasticsearch on Alibaba Cloud? Explore our tailored Cloud solutions and services to take the first step towards transforming your data into a visual masterpiece.

Please Click here, Embark on Your 30-Day Free Trial and discover the powerful capabilities of Alibaba Cloud Elasticsearch today.

0 1 0
Share on

Data Geek

98 posts | 4 followers

You may also like

Comments