Server mapping between Elastic search and CouchDB

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

--

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

I suspect that you are doing something wrong here.

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

Le 22 nov. 2012 à 08:00, narendra 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

--

--

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/" -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'
{
"_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 wrote:

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

I suspect that you are doing something wrong here.

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

Le 22 nov. 2012 à 08:00, narendra 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

--

--

--

Try this:
curl -XGET http://localhost:9200/lockproc/_mapping?pretty=1

Is it fine?

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

Le 22 nov. 2012 à 10:49, narendra choudharynarendra@gmail.com a écrit :

curl -XGET 'http://localhost:9200/_river/_mapping?pretty=1

--