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
[email protected]
blog : http://blog.johtani.info
twitter : http://twitter.com/johtani

> 2014/11/04 11:29、박재혁 <[email protected]> のメール:
> 
> sorry, I can't write English.
> 
> 1. couchdb 2 document...
> 
> {
> _id : "28f69ecd54ff0b85b4aca93183001984"
> _rev: "1-7679a3bc485b5cf37473d106c302b9cc"
> _name: "aaaa"
> _price: 100
> }
> 
> {
> _id : "28f69ecd54ff0b85b4aca93183001984"
> _rev: "1-7679a3bc485b5cf37473d106c302b9cc"
> _name: "aaaa"
> }
> 
> 
> 
> 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": "20000000",
>               "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 [email protected].
> 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 [email protected].
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.

Reply via email to