Skip to main content

Posts

Showing posts with the label records

Elasticsearch Queries (1)

Create indices 1 2 3 4 5 6 7 8 9 10 curl -XPUT 'localhost:9200/twitter?pretty' -H 'Content-Type: application/json' -d' {   "settings" : {   "index" : {   "number_of_shards" : 3,   "number_of_replicas" : 2   }   } } ' 2. Search 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 curl -XGET 'localhost:9200/sw/_search?pretty' -H 'Content-Type: application/json' -d' {   "query" : { "match_all" : {} },   "_source" : [ "gender" , "height" ] } '< /pre > 3. Creating index and adding documents to it <pre>curl -XPUT 'localhost:9200/my_index?pretty' -H 'Content-Type: application/json' -d' {   "mappings" : {   "my_t...