Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
courses:cs397:winter2017:elasticsearch [2017/03/27 17:23] – [Elasticsearch] admincourses:cs397:winter2017:elasticsearch [2017/04/16 19:23] – [Inserting documents to an index] admin
Line 67: Line 67:
  
   curl -XGET 'localhost:9200/bank/_search?q=*&size=1&from=10&pretty'   curl -XGET 'localhost:9200/bank/_search?q=*&size=1&from=10&pretty'
 +
 +==== Aggregations ====
 +
 +curl -XGET 'localhost:9200/bank/_search?pretty' -H 'Content-Type: application/json' -d'
 +{
 +  "size": 0,
 +  "aggs": {
 +    "group_by_state": {
 +      "terms": {
 +        "field": "state.keyword"
 +      }
 +    }
 +  }
 +}
 +'
  
 ===== Adding Information ===== ===== Adding Information =====
Line 80: Line 95:
   curl –XPUT ‘localhost:9200/index/external/newid?pretty’ –d’{“field”:”data”}’   curl –XPUT ‘localhost:9200/index/external/newid?pretty’ –d’{“field”:”data”}’
  
 +
 +===== Deleting Information =====
 +
 +  curl -XDELETE 'localhost:9200/students?pretty'
  
courses/cs397/winter2017/elasticsearch.txt · Last modified: 2017/04/16 19:26 by admin
CC Attribution-Noncommercial-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0