Jay Taylor's notes

back to listing index

search - How to create initial Elasticsearch settings when using the river plugin - Stack Overflow

[web search]
Original source (stackoverflow.com)
Tags: elasticsearch index-creation settings stackoverflow.com
Clipped on: 2012-11-01

I am using the river plugin for CouchDB and when I execute the following curl command:

    curl -XPUT 'localhost:9200/_river/blog/_meta' -d '{
    "type" : "couchdb",
    "couchdb" : {
    "host" : "localhost",
    "port" : 5984,
    "db" : "blog",
    "filter" : null
    "index" :{
    "analysis" :{

        "analyzer" :{ 
            "whitespace" :{ 
                "type" : "whitespace",
            "ox_edgeNGram" :{
                    "type" : "custom",
                    "tokenizer" : "ox_t_edgeNGram",
                    "filter" : ["lowercase"]
            "ox_NGram" :{
                    "type" : "custom",
                    "tokenizer" : "ox_t_NGram",
                    "filter" : ["lowercase"]


        "tokenizer" :{

receive the response:


The problem I have, is when I want to view the settings in the browser and go to: http://localhost:9200/blog/_settings?pretty=true

The json that is returned is as follows, but I'm expecting information regarding the analyzer etc. that I thought I created.

Returned JSON:

    blog: -{
    settings: -{
    index.number_of_shards: "5"
    index.number_of_replicas: "1"

It should also be noted that when I create a blog index without using the river and run a curl command to input the analysis information, I do receive a response from the browser indicating the settings that I input.

How can I set the default settings of a an index when using the River plugin?

Image (Asset 1/4) alt= 656414
asked Oct 28 '11 at 3:31
Image (Asset 2/4) alt= 306
add comment

2 Answers

up vote 0 down vote accepted

To solve this issue:

  1. Create new Elasticsearch index + mappings etc.
  2. Create new Elasticsearch river with the name of the index set to that of the index created in step one.

I found the answer here:


answered Oct 28 '11 at 20:48
Image (Asset 3/4) alt= 306
add comment

You can try this url http://localhost:9200/blog/_mapping?pretty=true In the response mapping, if the analyzer is not explicitly mentioned, it is then the default analyzer.

Image (Asset 4/4) alt= 1,153121
answered Feb 28 at 5:40
add comment

Your Answer

community wiki

Not the answer you're looking for? Browse other questions tagged or ask your own question.