Elasticsearch 1x1 Tutorial: Unterschied zwischen den Versionen

Aus Fachinformatiker Azubi
Zur Navigation springen Zur Suche springen
(init)
 
(Mapping)
Zeile 35: Zeile 35:
 
  GET /twitter/_mapping/_doc
 
  GET /twitter/_mapping/_doc
 
https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-mapping.html
 
https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-mapping.html
 +
 +
== Document ==
 +
 +
Hinzufügen:
 +
<pre>
 +
PUT twitter/_doc/1
 +
{
 +
    "user" : "kimchy",
 +
    "post_date" : "2009-11-15T14:12:12",
 +
    "message" : "trying out Elasticsearch"
 +
}
 +
</pre>
 +
https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-index_.html

Version vom 25. Juni 2018, 11:32 Uhr

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