Re: couchdb and elasticsearch problem.. (dynamic false)
> > curl -XPUT "http://localhost:9200/my_couchdb_idx/"; -d "{ > > "settings": { > >"number_of_shards": 6, > >"number_of_replicas": 1 > > }, > > "mappings": { > > "profiles": { > > "dynamic": "false", > > "properties": { > >"name": { "type": "string"}, > >"email": { "type": "string"} > > } > >} > > } > > }" > > and then curl -XPUT "localhost:9200/_river/my_couchdb_riv/_meta" -d "{ "type" : "couchdb", "couchdb" : { "host" : "192.168.0.29", "port" : 5984, "db" : "my_db_name", "filter" : null, "last_seq": "2000", "ignore_attachments":true}, "index" : { "index" : "my_couchdb_idx", "type" : "profiles", "bulk_size" : "100", "bulk_timeout" : "10ms" } } -- You received this message because you are subscribed to the Google Groups "elasticsearch" group. To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/b7060911-c36b-445e-9e94-fc8662e320d7%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: couchdb and elasticsearch problem.. (dynamic false)
Hi, You have two options. 1. Create index before inserting the data You create index before registering _river meta data. 1. create index with mappings 2. register _river meta 2. Use Index templates Elasticsearch provide Index templates that allow to define templates that will automatically be applied to new indices created. See: http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/indices-templates.html Jun Ohtani joht...@gmail.com blog : http://blog.johtani.info twitter : http://twitter.com/johtani > 2014/11/04 11:29、박재혁 のメール: > > sorry, I can't write English. > > 1. couchdb 2 document... > > { > _id : "28f69ecd54ff0b85b4aca93183001984" > _rev: "1-7679a3bc485b5cf37473d106c302b9cc" > _name: "" > _price: 100 > } > > { > _id : "28f69ecd54ff0b85b4aca93183001984" > _rev: "1-7679a3bc485b5cf37473d106c302b9cc" > _name: "" > } > > > > 2, river > > curl -XPUT "http://localhost:9200/_river/my_couchdb_idx/_meta"; -d "{ > "type" : "couchdb", > "couchdb" : { > "host" : "192.168.0.29", > "port" : 5984, > "db" : "my_couchdb", > "last_seq": "2000", > "filter" : null > } > }", > my_couchdb":{ > "mapping":{ > "my_couchdb":{ > "dynamic":"false", > "properties":{ > "name":{"type":"string"} > }" > > > > > > 3. curl localhost:9200/my_couchdb/_mapping > => { } > insert new data > curl localhost:9200/my_couchdb/_mapping > => { > "my_kangcom" : { > "mappings" : { > "my_kangcom" : { > "properties" : { > "_rev" : { > "type" : "string" > }, > "name" : { > "type" : "string" > }, > "price" : { > "type" : "long" > } > } > } > } > } > } > > > How to custom mapping... > > help me... > > > > > > -- > You received this message because you are subscribed to the Google Groups > "elasticsearch" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to elasticsearch+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/elasticsearch/79d76e8e-8c1e-4964-8d34-87e373bb9158%40googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "elasticsearch" group. To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/E740F60B-A603-4FA4-91D0-BABAAF317023%40gmail.com. For more options, visit https://groups.google.com/d/optout.
couchdb and elasticsearch problem.. (dynamic false)
sorry, I can't write English. 1. couchdb 2 document... { _id : "28f69ecd54ff0b85b4aca93183001984" _rev: "1-7679a3bc485b5cf37473d106c302b9cc" _name: "" _price: 100 } { _id : "28f69ecd54ff0b85b4aca93183001984" _rev: "1-7679a3bc485b5cf37473d106c302b9cc" _name: "" } 2, river curl -XPUT "http://localhost:9200/_river/my_couchdb_idx/_meta"; -d "{ "type" : "couchdb", "couchdb" : { "host" : "192.168.0.29", "port" : 5984, "db" : "my_couchdb", "last_seq": "2000", "filter" : null } }", my_couchdb":{ "mapping":{ "my_couchdb":{ "dynamic":"false", "properties":{ "*name":{"type":"string"*} }" 3. * curl localhost:9200/my_couchdb/_mapping* =>* { }* insert new data * curl localhost:9200/my_couchdb/_mapping* => { "my_kangcom" : { "mappings" : { "my_kangcom" : { * "properties" : {* * "_rev" : {* *"type" : "string"* * },* * "name" : {* *"type" : "string"* * },* * "price" : {* *"type" : "long"* * }* } } } } } How to custom mapping... help me... -- You received this message because you are subscribed to the Google Groups "elasticsearch" group. To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/79d76e8e-8c1e-4964-8d34-87e373bb9158%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.