Elasticsearch

From wikinotes

A search engine built overtop of lucene library.

Documentation

homepage https://www.elastic.co/elasticsearch/
intro https://www.elastic.co/guide/en/elastic-stack-get-started/current/get-started-elastic-stack.html
official docs https://www.elastic.co/guide/en/app-search/current/index.html
query DSL https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl.html
query syntax docs https://www.elastic.co/guide/en/app-search/current/search.html
param/api docs https://www.elastic.co/guide/en/app-search/current/api-reference.html

Usage

Version Info

curl http://127.0.0.1:9200
{
  "name" : "QtI5dUu",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "DMXhqzzjTGqEtDlkaMOzlA",
  "version" : {
    "number" : "7.10.2",
    "build_flavor" : "default",
    "build_type" : "tar",
    "build_hash" : "00d8bc1",
    "build_date" : "2018-06-06T16:48:02.249996Z",
    "build_snapshot" : false,
    "lucene_version" : "7.3.1",
    "minimum_wire_compatibility_version" : "5.6.0",
    "minimum_index_compatibility_version" : "5.0.0"
  },
  "tagline" : "You Know, for Search"
}

ElasticSearch is interfaced with using HTTP methods.
The query itself is encoded in the JSON payload.

curl -X POST 'https://domain.com/es/search' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer search-soaewu2ye6uc45dr8mcd54v8' \
-d '{
  "query": "wyoming AND montana OR california NOT washington"   # <-- query
}'