Couchdb and elasticsearch problem.. (dynamic false)

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"}}}}}
}"

    • 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+unsubscribe@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.

Hi,

You have two options.

  1. Create index before inserting the data
    You create index before registering _river meta data.

  2. create index with mappings

  3. register _river meta

  4. 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
johtani@gmail.com
blog : http://blog.johtani.info
twitter : http://twitter.com/johtani

2014/11/04 11:29、박재혁 aquua77@gmail.com のメール:

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"}}}}}
}"

  1. 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+unsubscribe@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+unsubscribe@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.

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": "20000000",
"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+unsubscribe@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.