This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -XDELETE 'localhost:9200/geo_test' | |
curl -XPOST 'localhost:9200/geo_test' -d ' | |
{ | |
"settings": { | |
"number_of_replicas": 0, | |
"number_of_shards": 1 | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -XDELETE 'localhost:9200/mapper_test' | |
curl -XPOST 'localhost:9200/mapper_test' -d ' | |
{ | |
"settings": { | |
"number_of_replicas": 0, | |
"number_of_shards": 1 | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -XDELETE 'localhost:9200/test' | |
curl -XPOST 'localhost:9200/test' -d ' | |
{ | |
"settings": { | |
"number_of_replicas": 0, | |
"number_of_shards": 1 | |
}, | |
"mappings": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -XDELETE 'localhost:9200/test' | |
curl -XPOST 'localhost:9200/test' -d ' | |
{ | |
"settings": { | |
"number_of_replicas": 0, | |
"number_of_shards": 1 | |
}, | |
"mappings": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -XDELETE localhost:9200/test | |
curl -XPOST localhost:9200/test -d '{ | |
"settings" : { | |
"number_of_shards" : 1 | |
}, | |
"mappings": { | |
"doc": { | |
"properties": { | |
"field": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> PUT test | |
{ | |
"acknowledged": true, | |
"shards_acknowledged": true, | |
"index": "test" | |
} | |
> GET /_stats/suggest | |
{ | |
"_shards": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PUT authors | |
PUT authors/_mapping/_doc | |
{ | |
"dynamic_templates":[ | |
{ | |
"template_1":{ | |
"match":"*", | |
"mapping":{ | |
"type":"long" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PUT music | |
{ | |
"mappings": { | |
"_doc" : { | |
"properties" : { | |
"suggest" : { | |
"type" : "completion", | |
"contexts": [ | |
{ | |
"name": "place_type", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PUT index | |
PUT index/_doc/1 | |
{ | |
"key": "value" | |
} | |
POST index/_search | |
{ | |
"query": { |
OlderNewer