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 -n $(curl -s localhost:9200 | python -c 'import sys,json; j = json.load(sys.stdin); print j["version"]["number"]') "" | |
| curl -s localhost:9200/_nodes/_local/jvm | python -c 'import sys,json; j = json.load(sys.stdin); print j["nodes"].items()[0][1]["jvm"]["version"]' |
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 | |
| curl -s localhost:9200/_cluster/nodes\?all | python -c' | |
| import sys, json | |
| d = json.load(sys.stdin) | |
| for id, n in d["nodes"].iteritems(): | |
| print "%s %s %s %s" % (n["version"], | |
| n["jvm"]["vm_name"], | |
| n["jvm"]["version"], | |
| n["transport"]["bound_address"]) |
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 -s p.draines.com/shards.sh | sh | fgrep ' r ' | sort >/tmp/1 | |
| sleep 30 | |
| curl -s p.draines.com/shards.sh | sh | fgrep ' r ' | sort >/tmp/2 | |
| diff -u /tmp/[12] |
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
| http://dumps.wikimedia.org/enwiki/20130805/enwiki-20130805-pages-articles1.xml-p000000010p000010000.bz2 | |
| http://dumps.wikimedia.org/enwiki/20130805/enwiki-20130805-pages-articles2.xml-p000010002p000024999.bz2 | |
| http://dumps.wikimedia.org/enwiki/20130805/enwiki-20130805-pages-articles3.xml-p000025001p000055000.bz2 | |
| http://dumps.wikimedia.org/enwiki/20130805/enwiki-20130805-pages-articles4.xml-p000055002p000104998.bz2 | |
| http://dumps.wikimedia.org/enwiki/20130805/enwiki-20130805-pages-articles5.xml-p000105002p000184999.bz2 | |
| http://dumps.wikimedia.org/enwiki/20130805/enwiki-20130805-pages-articles6.xml-p000185003p000305000.bz2 | |
| http://dumps.wikimedia.org/enwiki/20130805/enwiki-20130805-pages-articles7.xml-p000305002p000464996.bz2 | |
| http://dumps.wikimedia.org/enwiki/20130805/enwiki-20130805-pages-articles8.xml-p000465001p000665000.bz2 | |
| http://dumps.wikimedia.org/enwiki/20130805/enwiki-20130805-pages-articles9.xml-p000665001p000925000.bz2 | |
| http://dumps.wikimedia.org/enwiki/20130805/enwiki-20130805-pages-articles10.xml-p0009250 |
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/esnoob >/dev/null | |
| curl -XPUT localhost:9200/esnoob -d' | |
| { | |
| "mappings": { | |
| "t": { | |
| "properties": { | |
| "address": { | |
| "type": "string" | |
| } |
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
| =-= 1 | |
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/bash | |
| curl -XDELETE localhost:9200/test >/dev/null | |
| curl -XPUT localhost:9200/test -d' | |
| { | |
| "number_of_replicas": 0, | |
| "number_of_shards": 1 | |
| } |
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 | |
| curl -XDELETE localhost:9200/foo >/dev/null | |
| curl -XPUT localhost:9200/foo/t/1 -d'{"field":"value"}'; echo | |
| curl -XPOST localhost:9200/foo/_refresh; echo | |
| curl -v -H X-Opaque-Id:FOOOOOOO localhost:9200/foo/_search; echo |
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 | |
| curl -XDELETE localhost:9200/foo >/dev/null | |
| curl -XPOST localhost:9200/foo/t -d' | |
| { | |
| "clicks": 10, | |
| "impressions": 1000, | |
| "when": "2013-10-01" | |
| } |
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 | |
| index=$1 | |
| find . -name \*.bulk.gz | while read i; do | |
| gzip -cd $i | curl -XPOST localhost:9200/${index}/_bulk -d@- >/dev/null | |
| done | |