I was going through documentation for using elastisearch plugin for couchbase : https://github.com/couchbaselabs/elasticsearch-transport-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;
- In our case every couchbase document has field ‘objectType’.
- We are using XDCR to replicate data from CB to ES.
- We have index in ES for CB bucket.
- 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 ?