# Server mapping between Elastic search and CouchDB

**URL:** <https://discuss.elastic.co/t/server-mapping-between-elastic-search-and-couchdb/9790>\
**Category:** Elasticsearch\
**Created:** [November 22, 2012, 7:00am UTC](https://discuss.elastic.co/t/server-mapping-between-elastic-search-and-couchdb/9790 "2012-11-22T07:00:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![choudharynarendra](https://avatars.discourse-cdn.com/v4/letter/c/dbc845/32.png) [@choudharynarendra](https://discuss.elastic.co/u/choudharynarendra)\
**Post date:** [November 22, 2012, 7:00am UTC](https://discuss.elastic.co/t/server-mapping-between-elastic-search-and-couchdb/9790/1 "2012-11-22T07:00:41Z")

</div>

Hi All,

I am made the custom mapping in the elastic search but when i am  
integrating with the river plugin it is being overwritten the whole couchdb  
mapping with the documents which is being indexed...

So how should be i follow the approach so that my mapping will not get  
overwritten by the river plugin to elastic search.

Thanks  
Narendra

--

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [November 22, 2012, 8:01am UTC](https://discuss.elastic.co/t/server-mapping-between-elastic-search-and-couchdb/9790/2 "2012-11-22T08:01:09Z")

</div>

Could you send a gist with all curl commands you are executing?

I suspect that you are doing something wrong here.

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 22 nov. 2012 à 08:00, narendra [choudharynarendra@gmail.com](mailto:choudharynarendra@gmail.com) a écrit :

> Hi All,
> 
> I am made the custom mapping in the Elasticsearch but when i am integrating with the river plugin it is being overwritten the whole couchdb mapping with the documents which is being indexed...
> 
> So how should be i follow the approach so that my mapping will not get overwritten by the river plugin to Elasticsearch.
> 
> Thanks  
> Narendra
> 
> --

--

---

<div class="post-metadata">

**Author:** ![choudharynarendra](https://avatars.discourse-cdn.com/v4/letter/c/dbc845/32.png) [@choudharynarendra](https://discuss.elastic.co/u/choudharynarendra)\
**Post date:** [November 22, 2012, 9:49am UTC](https://discuss.elastic.co/t/server-mapping-between-elastic-search-and-couchdb/9790/3 "2012-11-22T09:49:26Z")

</div>

Hi David,

This is how I am creating index and mapping. I just want to index firstName  
field of document. Though, there are other fields as well in doc.

curl -XPUT "[http://localhost:9200/lockpoc/](http://localhost:9200/lockpoc/)" -d '{  
"settings": {  
"number\_of\_shards": 5,  
"number\_of\_replicas": 1,  
"mappings": {  
"profiles": {  
"properties": {  
"firstName": {  
"type": "string"  
}  
}  
}  
}  
}'

This is the command for connecting to CouchDB using river api. After  
executing river command, mapping gets changed and overriden by default  
dynamic mapping by CouchDB river.

curl -XPUT 'localhost:9200/\_river/  
profiles\_db/\_meta' -d '{  
"type" : "couchdb",  
"couchdb" : {  
"host" : "localhost",  
"port" : 5984,  
"db" : "registry",  
"filter" : null,  
"user" : "amit",  
"password" : "amit",  
"ignore\_attachments":true  
},  
"index" : {  
"index" : "lockpoc",  
"type" : "profiles",  
"bulk\_size" : "100",  
"bulk\_timeout" : "10ms"  
}  
}'

This is output of \_river/mapping. I am not sure why dynamic is true here.

curl -XGET '[http://localhost:9200/\_river/\_mapping?pretty=1](http://localhost:9200/_river/_mapping?pretty=1)'  
{  
"\_river" : {  
"profiles\_db" : {  
"properties" : {  
"couchdb" : {  
"dynamic" : "true",  
"properties" : {  
"db" : {  
"type" : "string"  
},  
"host" : {  
"type" : "string"  
},  
"ignore\_attachments" : {  
"type" : "boolean"  
},  
"last\_seq" : {  
"type" : "string"  
},  
"password" : {  
"type" : "string"  
},  
"port" : {  
"type" : "long"  
},  
"user" : {  
"type" : "string"  
}  
}  
},  
"index" : {  
"dynamic" : "true",  
"properties" : {  
"bulk\_size" : {  
"type" : "string"  
},  
"bulk\_timeout" : {  
"type" : "string"  
},  
"index" : {  
"type" : "string"  
},  
"type" : {  
"type" : "string"  
}  
}  
},  
"node" : {  
"dynamic" : "true",  
"properties" : {  
"id" : {  
"type" : "string"  
},  
"name" : {  
"type" : "string"  
},  
"transport\_address" : {  
"type" : "string"  
}  
}  
},  
"ok" : {  
"type" : "boolean"  
},  
"type" : {  
"type" : "string"  
}  
}  
}  
}  
}

On Thu, Nov 22, 2012 at 1:31 PM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:

> Could you send a gist with all curl commands you are executing?
> 
> I suspect that you are doing something wrong here.
> 
> --  
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> 
> Le 22 nov. 2012 à 08:00, narendra [choudharynarendra@gmail.com](mailto:choudharynarendra@gmail.com) a écrit :
> 
> Hi All,
> 
> I am made the custom mapping in the Elasticsearch but when i am  
> integrating with the river plugin it is being overwritten the whole couchdb  
> mapping with the documents which is being indexed...
> 
> So how should be i follow the approach so that my mapping will not get  
> overwritten by the river plugin to Elasticsearch.
> 
> Thanks  
> Narendra
> 
> --
> 
> --

--

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [November 22, 2012, 9:57am UTC](https://discuss.elastic.co/t/server-mapping-between-elastic-search-and-couchdb/9790/4 "2012-11-22T09:57:04Z")

</div>

Try this:  
curl -XGET [http://localhost:9200/lockproc/\_mapping?pretty=1](http://localhost:9200/lockproc/_mapping?pretty=1)

Is it fine?

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 22 nov. 2012 à 10:49, narendra [choudharynarendra@gmail.com](mailto:choudharynarendra@gmail.com) a écrit :

> curl -XGET '[http://localhost:9200/\_river/\_mapping?pretty=1](http://localhost:9200/_river/_mapping?pretty=1)

--

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 3:03am UTC](https://discuss.elastic.co/t/server-mapping-between-elastic-search-and-couchdb/9790/5 "2017-07-06T03:03:17Z")

</div>


