Created
August 29, 2013 21:39
-
-
Save emptyflask/6383762 to your computer and use it in GitHub Desktop.
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
# Create ES index | |
curl -XPUT 'http://search.foo.com:9200/api_master13/' -d ' | |
{ | |
"settings" : { | |
"number_of_shards" : 5, | |
"number_of_replicas" : 0 | |
}, | |
"mappings": { | |
"event": { | |
"properties": { | |
"_id": {"type":"string", "index":"not_analyzed"}, | |
"name": {"type":"string"}, | |
"category": {"type":"string", "analyzer":"keyword"}, | |
"event_type": {"type":"string", "analyzer":"keyword"}, | |
"conference": {"type":"string", "index":"not_analyzed"} | |
} | |
} | |
} | |
} | |
' | |
# Create the couchdb river to import data into the index | |
curl -XPUT 'search.foo.com:9200/_river/api_master13/_meta' -d '{ | |
"type" : "couchdb", | |
"couchdb" : { | |
"host" : "couch.foo.com", | |
"port" : 5984, | |
"db" : "api_master13", | |
"filter" : "events" | |
}, | |
"index" : { | |
"index" : "api_master13", | |
"type" : "api_master13", | |
"bulk_size" : "100", | |
"bulk_timeout" : "10ms" | |
} | |
}' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment