elasticsearch cluster deployment-practical operation

elasticsearch (cluster) Case version: elasticsearch 8.6.2 Operating system: CentOS 7 Note: Use normal user operations throughout the process. 0. Node information Node Description 192.168.127.10 master 192.168.127.11 slave … slave02 1. Environment configuration 1.1 Modify the file /etc/security/limits.conf Adjust the maximum open file descriptor of the process (nofile) Maximum number of user processes (nproc) Maximum locked […]

ELK (2) elasticsearch

Introduction to elasticsearch Elasticsearch is an open source distributed, RESTful-style search and data analysis engine. Its bottom layer is an open source library. Apache Lucene. Port: 9200 Advantages: distributed high availability, simple to use, fast search speed, easy to expand horizontally Disadvantages: Without detailed permission management, each node may have inconsistent information due to network […]

Java integration ElasticSearch

Java integrates ElasticSearch, including: introduction of ES client dependencies, client creation, ES index management, ES pipeline management, ES adding, modifying, deleting, and querying data. 1. Introduce dependencies <dependency> <groupId>org.elasticsearch.client</groupId> <artifactId>elasticsearch-rest-high-level-client</artifactId> <version>7.16.3</version> </dependency> 2. Create client 2.1 Tools import org.apache.http.HttpHost; import org.apache.http.client.config.RequestConfig.Builder; import org.apache.http.impl.nio.client.HttpAsyncClientBuilder; import org.elasticsearch.client.RestClient; import org.elasticsearch.client.RestClientBuilder; import org.elasticsearch.client.RestClientBuilder.HttpClientConfigCallback; import org.elasticsearch.client.RestClientBuilder.RequestConfigCallback; import net.sinodata.smart.xmgl.common.PropertiesUtil; import org.elasticsearch.client.RestHighLevelClient; […]

Elasticsearch (3) basic use of aggregation

Basic concepts bucket Data grouping, some data is divided into buckets according to a certain field, and data with the same field value is put into a bucket. It can be understood as the Map structure in Java, similar to the query results after group by in Mysql. metric: Statistics performed on a data group, […]

(11) Springboot+ElasticSearch8 integration

Foreword After Elasticsearch version 7.15, Elasticsearch officially marked its advanced client RestHighLevelClient as deprecated. Launched a new Java API client, Elasticsearch Java API Client, which will also become the officially recommended client in Elasticsearch 8.0 and later versions. 1. Import ES dependencies <!–es search–> <dependency> <groupId>co.elastic.clients</groupId> <artifactId>elasticsearch-java</artifactId> <version>8.1.3</version> </dependency> <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> <version>2.13.3</version> </dependency> An […]

Query Elasticsearch using Elasticsearch RestHighLevelClient

pom: <?xml version=”1.0″ encoding=”UTF-8″?> <project xmlns=”http://maven.apache.org/POM/4.0.0″ xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:schemaLocation=”http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd”> <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.7.8</version> <relativePath/> </parent> <groupId>com.spring</groupId> <artifactId>elasticsearch-high-level-rest</artifactId> <version>0.0.1-SNAPSHOT</version> <name>elasticsearch-high-level-rest</name> <description>elasticsearch-high-level-rest</description> <properties> <java.version>1.8</java.version> <elasticsearch.version>7.1.0</elasticsearch.version> <fastjson.version>2.0.30</fastjson.version> </properties> <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter</artifactId> </dependency> <!– The starter of elasticsearch, mainly to realize automatic configuration and obtain rest client conveniently and quickly –> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-elasticsearch</artifactId> <exclusions> <exclusion> <groupId>org.springframework.data</groupId> […]

Using Docker to install ElasticSearch7.10.x cluster in Linux

Please visit here to install ElasticSearch7.10.x single node using Docker 1. Cluster environment description Server IP address 192.168.137.1, 192.168.137.2, 192.168.137.3 2. Preparation 1. Pull the image docker pull elasticsearch:7.10.1 2. First, you need to create an initial container for generating secret keys. The following is the command: docker run -d –user=root –privileged=true –name elasticsearch-temp -p […]

Core concepts and usage scenarios of ElasticSearch

Author: Zen and the Art of Computer Programming 1. Introduction ElasticSearch is an open source distributed search and analysis engine. Based on the Lucene search framework, it provides an efficient, reliable, and fast search and data analysis solution. It features cloud computing and ultra-large-scale search capabilities. ElasticSearch was originally developed by the Elasticsearch company and […]