This file contains hidden or 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
# Delete the index `testindex` | |
curl -XDELETE 'http://localhost:9200/test' ; echo | |
# Create the index `testindex` | |
curl -XPUT 'http://localhost:9200/test' -d '{ | |
"settings" : { | |
"index" : { | |
"number_of_shards" : 1, | |
"number_of_replicas" : 0 | |
}, |
This file contains hidden or 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
# Delete the index `testindex` | |
curl -XDELETE 'http://localhost:9200/testindex' | |
# Create the index `testindex` | |
curl -XPUT 'http://localhost:9200/testindex' -d '{ | |
"settings" : { | |
"index" : { | |
"number_of_shards" : 1, | |
"number_of_replicas" : 0 | |
} |
This file contains hidden or 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
{ | |
"took" : 1, | |
"timed_out" : false, | |
"_shards" : { | |
"total" : 1, | |
"successful" : 1, | |
"failed" : 0 | |
}, | |
"hits" : { | |
"total" : 3, |
This file contains hidden or 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
{ | |
"took" : 33, | |
"timed_out" : false, | |
"_shards" : { | |
"total" : 1, | |
"successful" : 1, | |
"failed" : 0 | |
}, | |
"hits" : { | |
"total" : 2, |
This file contains hidden or 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
# Delete Test index | |
curl -XDELETE 'http://localhost:9200/facets_test/' | |
# Create index and analyzer | |
curl -XPUT 'http://localhost:9200/facets_test?pretty' -d '{ | |
"settings":{ | |
"analysis": { | |
"analyzer": { | |
"email":{ | |
"type": "custom", |
This file contains hidden or 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
####### PREPARE TEST PLATFORM | |
### First install elasticsearch 0.20.6 | |
# curl https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.20.6.zip -o elasticsearch-0.20.6.zip | |
# unzip elasticsearch-0.20.6.zip | |
# cd elasticsearch-0.20.6 | |
### Install mapper attachment plugin | |
# bin/plugin -install elasticsearch/elasticsearch-mapper-attachments/1.6.0 |
This file contains hidden or 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
# Print ES Version | |
curl 'http://localhost:9200/' | |
# Delete the index `testindex` | |
curl -XDELETE 'http://localhost:9200/testindex' | |
# Create the index `testindex` | |
curl -XPUT 'http://localhost:9200/testindex' -d '{ | |
"settings" : { | |
"index" : { |
This file contains hidden or 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 http://localhost:9200/log/log/ | |
curl -XPUT http://localhost:9200/log/log/_mapping -d ' | |
{ | |
"log" : { | |
"properties" : { | |
"date" : { | |
"type" : "date", | |
"format" : "dateOptionalTime" | |
}, |
This file contains hidden or 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 http://localhost:9200/npefuzzy | |
curl -XPUT http://localhost:9200/npefuzzy?pretty -d '{ | |
"settings" : { "index" : { "number_of_shards" : 1, "number_of_replicas" : 0 }} | |
}' | |
curl -XPUT http://localhost:9200/npefuzzy/beer/1?pretty -d '{ | |
"brand":"Grimbergen", | |
"colour":"PALE", | |
"size":1.3476184461445255, |
This file contains hidden or 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/listing | |
curl -XPUT localhost:9200/listing | |
curl -XPUT localhost:9200/listing/listing/_mapping -d ' | |
{"listing":{"properties":{"address":{"type":"string"}, | |
"id":{"type":"string"}, | |
"location":{"type":"geo_point"} | |
}}}' | |
curl -X PUT localhost:9200/_percolator/listing/q1str2?pretty -d ' | |
{"query": |