Skip to content

Instantly share code, notes, and snippets.

View dadoonet's full-sized avatar
🇪🇺
From Europe with ❤️

David Pilato dadoonet

🇪🇺
From Europe with ❤️
View GitHub Profile
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":
@dadoonet
dadoonet / attachment.sh
Created October 17, 2012 17:49 — forked from lukas-vlcek/gist:1075067
Test of attachments plugin
#!/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
@dadoonet
dadoonet / search.sh
Created July 28, 2012 10:33 — forked from anonymous/search more types.
searching on more types but results only for one type, please help!
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,
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_