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 -XPOST 'http://localhost:9200/spokely_development_users' -d '{"mappings":{"user":{"properties":{"id":{"index":"not_analyzed","type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"headline":{"type":"string"},"jobs":{"type":"object"},"educations":{"type":"object"},"skills":{"type":"string"},"linkedin_summary":{"type":"string"},"linkedin_groups":{"type":"string"},"linkedin_certifications":{"type":"string"},"fb_user_id":{"index":"not_analyzed","include_in_all":false,"type":"string"},"fb_connections":{"index":"not_analyzed","include_in_all":false,"type":"string"},"linkedin_id":{"index":"not_analyzed","include_in_all":false,"type":"string"},"linkedin_connections":{"index":"not_analyzed","include_in_all":false,"type":"string"},"is_active":{"type":"boolean","include_in_all":false},"is_email_confirmed":{"type":"boolean","include_in_all":false}}}},"settings":{}}' | |
curl -XPOST 'http://localhost:9200/spokely_development_users/user/3457' -d '{"fb_connections":[],"fb_user_id":"1314809","first_ |
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/pms' | |
curl -XPUT 'http://localhost:9200/pms/Building/1' -d ' | |
{ | |
"id":11, | |
"building":{ | |
"address":{ | |
"street2":"test_street2_11", | |
"region":"test_region_11", | |
"id":11, |
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
#!/bin/sh | |
http://cloud.github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.19.10.zip | |
unzip elasticsearch-0.19.10.zip | |
elasticsearch-0.19.10/bin/plugin -install elasticsearch/elasticsearch-mapper-attachments/1.6.0 | |
elasticsearch-0.19.10/bin/elasticsearch | |
sleep 10 |
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": |
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
// app.js | |
angular.module('cs_demo', [ | |
'controllers', | |
'elasticjs.service', | |
'ui.bootstrap' | |
]); |
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 -XPUT http://localhost:9200/test/ticket/_mappinq? -d '{ | |
"ticket" : { | |
"properties" : { | |
"DOC_CREATION_DATE" : { | |
"type" : "date", | |
"format" : "yyyy-MM-dd || yyyy-MM-dd HH:mm:ss", | |
"locale" : "FR" | |
} | |
} | |
} |
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
echo "Deleting old ElasticSearch index..." | |
curl -XDELETE 'localhost:9200/arrtest'; echo | |
echo "Creating new ElasticSearch index..." | |
curl -XPUT 'localhost:9200/arrtest/?pretty=1' -d ' | |
{ | |
"mappings" : { | |
"cust2" : { | |
"properties" : { | |
"firstName" : { |
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/test"; echo | |
curl -XPUT "http://localhost:9200/test" -d' | |
{ | |
"settings": { | |
"index": { | |
"number_of_shards": 1, | |
"number_of_replicas": 0 | |
}, | |
"analysis": { | |
"analyzer": { |
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/logstash-2013.12.20/'; echo | |
curl -XPOST 'http://localhost:9200/logstash-2013.12.20/cloudtest' -d ' | |
{ | |
"responseElements": { | |
"instancesSet": { | |
"items": [ | |
{ | |
"instanceId": "i-1bbb1111", | |
"currentState": { |
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 index | |
curl -s -X DELETE "http://$host:$port/multi_field_facetting" 2>&1 > /dev/null | |
# Create index | |
curl -s -X POST "http://$host:$port/multi_field_facetting" -d ' | |
{ | |
"settings" : { | |
"index": { | |
"analysis" : { | |
"filter" : { |
OlderNewer