Couchbase elasticsearch plugin

I was going through documentation for using elastisearch plugin for couchbase :

This document mentioned about routing documents to specific type in ElasticSearch based on field in document using couchbase.documentTypeRoutingFields.*
I didn’t understand the example and/or conecpt. Can you please elaborate more on this.
I am looking for;

  1. In our case every couchbase document has field ‘objectType’.
  2. We are using XDCR to replicate data from CB to ES.
  3. We have index in ES for CB bucket.
  4. In elasticsearch we want documents to be routed to different types(under same index) based on value of field ‘objectType’
    e.g if objectType = “account” , document should go under ‘account’ type in ES.
    if objectType = “event”, document should go under ‘event’ type in ES.

I know i have to create mapping, but i am not sure how these docs will be routed to specific type ?
Could you please help me with this ?

documentTypeRoutingFields is used to mapping parent-child relationships 's parent_id, what you want is to mapping docs to specific type by doc’s value :

may be you can use org.elasticsearch.transport.couchbase.capi.DelimiterTypeSelector If your inclued objectType.