Elasticsearch 1x1 Tutorial

Aus Fachinformatiker Azubi
Zur Navigation springen Zur Suche springen

Elasticsearch Tutorial

Index

Erstellen:

PUT twitter

https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-create-index.html

Löschen

DELETE twitter

https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-delete-index.html

Lesen:

GET twitter

https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-index.html

Mapping

Erstellen:

PUT twitter/_mapping/_doc 
{
  "properties": {
    "email": {
      "type": "keyword"
    }
  }
}

https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-put-mapping.html

Lesen:

GET /twitter/_mapping/_doc

https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-mapping.html

Document

Hinzufügen:

PUT twitter/_doc/1
{
    "user" : "kimchy",
    "post_date" : "2009-11-15T14:12:12",
    "message" : "trying out Elasticsearch"
}

https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-index_.html