Difference between revisions of "Elastic Search"

(Installation)
(Installation)
Line 32: Line 32:
 
https://www.elastic.co/blog/running-elasticsearch-on-aws
 
https://www.elastic.co/blog/running-elasticsearch-on-aws
  
<syntaxhighlight lang="java">
+
<source>
$ https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.15.1-linux-x86_64.tar.gz
+
# wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.15.1-linux-x86_64.tar.gz
$ https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.15.1-linux-x86_64.tar.gz.sha512
+
# wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.15.1-linux-x86_64.tar.gz.sha512
</syntaxhighlight>
+
# shasum -a 512 -c elasticsearch-7.15.1-linux-x86_64.tar.gz.sha512
 +
# tar -xzf elasticsearch-7.15.1-linux-x86_64.tar.gz
 +
# cd elasticsearch-7.15.1/
 +
</source>

Revision as of 08:15, 27 October 2021

Elasticsearch is a search engine based on Lucene. It provides a distributed, multitenant-capable full-text search engine with an HTTP web interface and schema-free JSON documents. Elasticsearch is developed in Java and is released as open source under the terms of the Apache License. Official clients are available in Java, .NET (C#), PHP, Python, Apache Groovy, Ruby and many other languages.[2] According to the DB-Engines ranking, Elasticsearch is the most popular enterprise search engine followed by Apache Solr, also based on Lucene.

Elasticsearch is developed alongside a data-collection and log-parsing engine called Logstash, and an analytics and visualisation platform called Kibana. The three products are designed for use as an integrated solution, referred to as the "Elastic Stack" (formerly the "ELK stack").

Elasticsearch can be used to search all kinds of documents. It provides scalable search, has near real-time search, and supports multitenancy. "Elasticsearch is distributed, which means that indices can be divided into shards and each shard can have zero or more replicas. Each node hosts one or more shards, and acts as a coordinator to delegate operations to the correct shard(s). Rebalancing and routing are done automatically".[2] Related data is often stored in the same index, which consists of one or more primary shards, and zero or more replica shards. Once an index has been created, the number of primary shards cannot be changed.

Elasticsearch uses Lucene and tries to make all its features available through the JSON and Java API. It supports facetting and percolating, which can be useful for notifying if new documents match for registered queries.

Another feature is called "gateway" and handles the long-term persistence of the index;[6] for example, an index can be recovered from the gateway in the event of a server crash. Elasticsearch supports real-time GET requests, which makes it suitable as a NoSQL datastore, but it lacks distributed transactions.

Apache Lucene

Kibana

NoSQL

ElasticSearch Quick Notes

Installation

elesticsearch installation : https://www.elastic.co/guide/en/elasticsearch/reference/current/targz.html


Enable automatic creation of system indicesedit action.auto_create_index: .monitoring*,.watches,.triggered_watches,.watcher-history*,.ml*

  •  > you may consider setting the value to * which will allow automatic creation of all indices.

Running Elasticsearch from the command line

Test elasticsearch installation

Running as a daemon

https://www.elastic.co/blog/running-elasticsearch-on-aws

# wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.15.1-linux-x86_64.tar.gz
# wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.15.1-linux-x86_64.tar.gz.sha512
# shasum -a 512 -c elasticsearch-7.15.1-linux-x86_64.tar.gz.sha512
# tar -xzf elasticsearch-7.15.1-linux-x86_64.tar.gz
# cd elasticsearch-7.15.1/