server="localhost" printf "\n\nCreate the index\n" curl -XPUT "$server:9200/index1" printf "\n\nCreate the mapping\n" curl -XPUT "$server:9200/index1/mapping1/_mapping" -d '{ "type1" : { "dynamic" : false, "properties" : { "note_text" : {"type" : "string", "store" : "no"} } } } ' printf "\n\nConfigure the river\n" curl -XPUT "$server:9200/_river/river1/_meta" -d '{ "type" : "couchdb", "couchdb" : { "host" : "localhost", "port" : 5984, "user" : "admin", "password" : "admin", "db" : "notes" }, "index" : { "index" : "index1", "type" : "type1", "dynamic" : false } }' # Wait some time for indexing to work sleep 30 printf "\n\nAnd now search!\n" curl -XGET "http://$server:9200/index1/_search?q=note_text:hello&pretty=true"