% bin/elasticsearch \
-Des.cluster.name=drewr1 \
-Des.network.host=127.0.0.1 \
-Des.discovery.zen.ping.unicast.hosts=127.0.0.1 \
#!/bin/bash | |
# | |
# esdiagdump | |
# | |
# Usage: esdiagdump [-h <hostname/IP>:<port>] [-o <output filename>] | |
# hostname defaults to localhost | |
# output file defaults to current directory/esdiagdump.out.<timestamp> | |
# | |
# This version is no longer being maintained. The current version lives in the elasticsearch/dev/shared/tools repository. |
#!/usr/bin/env bash | |
# To use this script, copy and paste it in elasticsearch git root dir | |
# launch | |
# git bisect start {bad revision} {good revision} | |
# git bisect run ./test.sh | |
echo " -> starting a new test" | |
echo "$(git show --quiet)" |
#!/bin/bash | |
pkill -f 'elasticsearch.*cluster.name=8823' | |
rm -rf data/8823 | |
bin/elasticsearch -Des.node.master=true -Des.cluster.name=8823 -Des.node.name=master 2>&1 >/dev/null & | |
sleep 1 | |
bin/elasticsearch -Des.node.master=false -Des.cluster.name=8823 -Des.node.name=data1 2>&1 >/dev/null & | |
sleep 1 |
#!/bin/bash | |
set -e | |
if [ "x$1" == "x-h" ] ; then | |
echo "Usage: $0 version destdir plugins" | |
exit | |
fi | |
CURRENT="0.90.0.RC1" |
curl -XDELETE "http://localhost:9200/test?pretty" | |
curl -XPOST "http://localhost:9200/test?pretty" -d '{ | |
"settings": { | |
"index": { | |
"number_of_shards": 1, | |
"number_of_replicas": 0, | |
"analysis":{ | |
"analyzer":{ | |
"suggest":{ | |
"type": "custom", |
// Set codec, dir and segmentName accordingly to the segment you are trying to restore | |
Codec codec = new Lucene42Codec(); | |
Directory dir = FSDirectory.open(new File("/tmp/test")); | |
String segmentName = "_0"; | |
IOContext ioContext = new IOContext(); | |
SegmentInfo segmentInfos = codec.segmentInfoFormat().getSegmentInfoReader().read(dir, segmentName, ioContext); | |
Directory segmentDir; | |
if (segmentInfos.getUseCompoundFile()) { | |
segmentDir = new CompoundFileDirectory(dir, IndexFileNames.segmentFileName(segmentName, "", IndexFileNames.COMPOUND_FILE_EXTENSION), ioContext, false); |
# Create a local proxy for <http://download.elasticsearch.org> | |
# ============================================================ | |
# | |
# This setup and Nginx configuration provides a local webserver which intercepts requests | |
# to <http://download.elasticsearch.org> and serves a local file instead, | |
# facilitating and speeding up demonstrations at conferences, meetups, etc. | |
# | |
# | |
# 1. Create directories for Nginx: | |
# |
curl -XPUT "http://localhost:9200/index2" -d' | |
{ | |
"mappings": { | |
"child" : { | |
"_parent": { | |
"type": "child" | |
} | |
} | |
} | |
}' |
cd ~ | |
sudo apt-get update | |
sudo apt-get install openjdk-7-jre-headless -y | |
# Download the compiled elasticsearch rather than the source. | |
wget http://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.20.2.tar.gz -O elasticsearch.tar.gz | |
tar -xf elasticsearch.tar.gz | |
rm elasticsearch.tar.gz | |
sudo mv elasticsearch-* elasticsearch | |
sudo mv elasticsearch /usr/local/share |