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"
}
}
}
}
}
Regards,
Amit
On Mon, Nov 5, 2012 at 2:51 AM, David Pilato david@pilato.fr wrote:
Hi Amit,****
Can you elaborate a bit more what is your concern?****
If you have created first your index and type with its mapping (with all
fields that CouchDB will send), ES will not have to update it.****
Can you gist your commands and what you are seeing?****
David****
De : elasticsearch@googlegroups.com [mailto:
elasticsearch@googlegroups.com] De la part de Amit Singh
Envoyé : dimanche 4 novembre 2012 19:51
À : elasticsearch@googlegroups.com
Objet : How to stop couchdb river to use default dynamic mapping****
How to disable Couchdb river dynamic mapping? I have my own custom mapping
and I create this mapping at time of index creation. When I integrate
couchdb with ES, my custom mappings get overridden by river's default
dynamic mapping. Not sure why this is happening.****
--
--
--