Skip to content

Instantly share code, notes, and snippets.

name: ${HOSTNAME}
# The cluster should be named with the name of the AD domain
cluster:
name: dev-0.13.0-SNAPSHOT
# Throttling disabled for testing
# routing:
# allocation:
# Defaults to # of CPUs + 1... not a sane default with 24 core systems
# concurrent_recoveries: 6
curl -XPUT 'http://localhost:9200/twitter0/' -d '
index :
number_of_shards : 1
number_of_replicas : 1
'
curl -XPUT 'http://localhost:9200/twitter1/' -d '
index :
number_of_shards : 1
number_of_replicas : 1
{
cluster_name: "dev-0.13.0-SNAPSHOT"
master_node: "LKaqdRfERaG4CGPAgPgRWA"
-blocks: {
-indices: {
twitter70: { }
twitter71: { }
twitter72: { }
twitter73: { }
twitter75: { }
@ppearcy
ppearcy / gist:786580
Created January 19, 2011 18:19
Script field failure
curl -XPUT 'http://localhost:9200/twitter/'
curl -XPUT 'http://localhost:9200/twitter/tweet/1' -d '
{
"attachmentcontent" : "test of script fields stuff"
}
'
curl -XPUT 'http://localhost:9200/twitter/tweet/2' -d '
{
@ppearcy
ppearcy / rabbitmqsasllog
Created February 3, 2011 00:05
rabbitmqsasl log
=SUPERVISOR REPORT==== 26-Jan-2011::21:35:16 ===
Supervisor: {<0.27739.176>,
rabbit_channel_sup_sup}
Context: shutdown_error
Reason: shutdown
Offender: [{pid,<0.28099.176>},
{name,channel_sup},
{mfa,{rabbit_channel_sup,start_link,[]}},
{restart_type,temporary},
Create index:
curl -XPUT 'http://localhost:9200/my_twitter1/' -d '
{
"settings": {
"number_of_shards": 1,
"number_of_replicas": 0
},
"mappings": {
@ppearcy
ppearcy / gist:1279879
Created October 12, 2011 00:26
ES synonym failure on 0.17.8
# Here are the contents of the synonym file that is located here: analysis/synonym_test.txt
test1, a+b
test2, b+c
test3, d/c
work, business
# Create the index
curl -XPOST localhost:9200/es-syntest -d '{
"settings" : {
"number_of_shards" : 1,
# Create new index with dynamic analyzer - works
curl -XPOST localhost:9200/es-syntest -d '{
"settings" : {
"number_of_shards" : 1,
"analysis" : {"analyzer":{"synonym_test_analyzer":{"type":"custom","tokenizer":"standard","filter":["synonym_test"]}},"filter":{"synonym_test":{"type":"synonym","synonyms_path":"analysis/synonym_test.txt","ignore_case":true,"expand":false}}}
},
"mappings" : {
"es-syntest" : {
"properties" : {
"attachmentcontent" : { "type" : "string", "omit_norms" : true, "include_in_all" : false, "analyzer" : "synonym_test_analyzer", "term_vector" : "with_positions_offsets"}
curl -XDELETE 'http://localhost:9200/syntest/'
curl -XPOST localhost:9200/syntest -d '{
"settings" : {
"number_of_shards" : 1,
"analysis" : {"analyzer": {"syntest_analyzer":{"type":"custom","tokenizer":"standard","filter":["standard", "lowercase", "syntest_synonym", "stop", "english_snowball"]}, "dr_no_syn" : {"type":"custom","tokenizer":"standard","filter":["standard", "lowercase", "stop", "english_snowball"]}},"filter":{"syntest_synonym":{"type":"synonym","synonyms" : ["atripla, efavirenz emtricitabine, efavirenz/emtricitabine", "emtricitabine tenofovir, emtricitabine/tenofovir, truvada", "tenofovir disoproxil, viread"],"ignore_case":true,"expand":true, "tokenizer":"standard"},"english_snowball":{"type":"snowball","language" : "English"}}}
},
"mappings" : {
"syntest" : {
"properties" : {
@ppearcy
ppearcy / gist:1349777
Created November 8, 2011 23:59
Synonym search failure
curl -XDELETE 'http://localhost:9200/syntest/'
curl -XPOST localhost:9200/syntest -d '{
"settings" : {
"number_of_shards" : 1,
"analysis" : {
"analyzer": {
"syntest_analyzer":{"type":"custom","tokenizer":"standard","filter":["standard", "lowercase", "syntest_synonym", "stop", "english_snowball"]},
"syntest_analyzer_nosyn":{"type":"custom","tokenizer":"standard","filter":["standard", "lowercase", "stop", "english_snowball"]}, "dr_no_syn" : {"type":"custom","tokenizer":"standard","filter":["standard", "lowercase", "stop", "english_snowball"]}
},