all repos — gemini-redirect @ 6f0d08cff1bbc4aa09a1f4e09e1ef5f2cb29a882

blog/ribw/what-is-elasticsearch-and-why-should-you-care/index.html (view raw)

 1<!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta name=description content="Official Lonami's website"><meta name=viewport content="width=device-width, initial-scale=1.0, user-scalable=yes"><title> What is ElasticSearch and why should you care? | Lonami's Blog </title><link rel=stylesheet href=/style.css><body><article><nav class=sections><ul class=left><li><a href=/>lonami's site</a><li><a href=/blog class=selected>blog</a><li><a href=/golb>golb</a></ul><div class=right><a href=https://github.com/LonamiWebs><img src=/img/github.svg alt=github></a><a href=/blog/atom.xml><img src=/img/rss.svg alt=rss></a></div></nav><main><h1 class=title>What is ElasticSearch and why should you care?</h1><div class=time><p>2020-03-18T02:00:00+00:00<p>last updated 2020-03-27T11:04:45+00:00</div><p>ElasticSearch is a giant search index with powerful analytics capabilities. It’s like a database and search engine on steroids, really easy and fast to get up and running. One can think of it as your own Google, a search engine with analytics.<p>ElasticSearch is rich, stable, performs well, is well maintained, and able to scale to petabytes of any kind of data, whether it’s structured, semi-structured or not at all. It’s cost-effective and can be used to make business decisions.<p>Or, described in 10 seconds:<blockquote><p>Schema-free, REST & JSON based distributed document store Open source: Apache License 2.0 Zero configuration</blockquote><p>-- Alex Reelsen<h2 id=basic-capabilities>Basic capabilities</h2><p>ElasticSearch lets you ask questions about your data, not just make queries. You may think SQL can do this too, but what’s important is making a pipeline of facets, and feed the results from query to query.<p>Instead of changing your data, you can be flexible with your questions with no need to re-index it every time the questions change.<p>ElasticSearch is not just to search for full-text data, either. It can search for structured data and return more than just the results. It also yields additional data, such as ranking, highlights, and allows for pagination.<p>It doesn’t take a lot of configuration to get running, either, which can be a good boost on productivity.<h2 id=how-does-it-work>How does it work?</h2><p>ElasticSearch depends on Java, and can work in a distributed cluster if you execute multiple instances. Data will be replicated and sharded as needed. The current version at the time of writing is 7.6.1, and it’s being developed fast!<p>It also has support for plugins, with an ever-growing ecosystem and integration on many programming languages. Tools around it are being built around it, too, like Kibana which helps you visualize your data.<p>The way you use it is through a JSON API, served over HTTP/S.<h2 id=how-can-i-use-it>How can I use it?</h2><p><a href=https://www.elastic.co/downloads/>You can try ElasticSearch out for free on Elastic Cloud</a>, however, it can also be <a href=https://www.elastic.co/downloads/elasticsearch>downloaded and ran offline</a>, which is what we’ll do. Download the file corresponding to your operating system, unzip it, and execute the binary. Running it is as simple as that!<p>Now you can make queries to it over HTTP, with for example <code>curl</code>:<pre><code>curl -X PUT localhost:9200/orders/order/1 -d '
 2{
 3  "created_at": "2013/09/05 15:45:10",
 4  "items": [
 5    {
 6      name: "HD Monitor"
 7    }
 8  ],
 9  "total": 249.95
10}'
11</code></pre><p>This will create a new order with some information, such as when it was created, what items it contains, and the total cost of the order.<p>You can then query or filter as needed, script it or even create statistics.<h2 id=references>References</h2><ul><li><a href=https://youtu.be/sKnkQSec1U0>YouTube – What is Elasticsearch?</a><li><a href=https://youtu.be/yWNiRC_hUAw>YouTube – GOTO 2013 • Elasticsearch – Beyond Full-text Search • Alex Reelsen</a><li><a href=https://www.elastic.co/kibana>Kibana – Your window into the Elastic Stack</a><li><a href=https://www.elastic.co/guide/index.html>Elastic Stack and Product Documentation</a></ul></main><footer><div><p>Share your thoughts, or simply come hang with me <a href=https://t.me/LonamiWebs><img src=/img/telegram.svg alt=Telegram></a> <a href=mailto:totufals@hotmail.com><img src=/img/mail.svg alt=Mail></a></div></footer></article><p class=abyss>Glaze into the abyss… Oh hi there!