Short answer: Delete the Elasticsearch indexes, then re-stream everything from Couchbase by running
cbes-checkpoint-clear (make sure the connector is stopped what you run that command).
If you want to preserve the contents of the indexes, or you’re interested in the details, here’s the long answer:
In Elasticsearch 6 and later only one document type is allowed per index. In Elasticsearch 5.6 you can preview this behavior by setting index.mapping.single_type to
true for an index.
cbes-rejects index already has a mapping type called
couchbaseCheckpoint, so the connector is unable to create a document of type
_doc. The same may be true of the other indexes where you want the actual Couchbase documents to go.
couchbaseCheckpoint type is metadata used by the old version of the connector. You don’t need it anymore. The old connector also used a
couchbaseDocument mapping type for the documents themselves.
Unfortunately, it’s not possible to delete a mapping type from an index. The Elasticsearch documentation recommends deleting the index and recreating it without the offending mapping type. It may be possible to use the reindex API to preserve any documents you want to keep, and to assign a new mapping type to those documents. For forward compatibility, the recommended type name is
If you’re happy to let the new connector re-stream everything from Couchbase, just delete the
cbes-rejects index (and any other indexes targeted by the new connector) to get rid of the obsolete
couchbaseDocument mappings types.
If you’re upgrading to Elasticsearch 6 and connector version 4 at the same time and you want to preserve the contents of your indexes, the best path is probably to upgrade the connector first, then reindex so you have one mapping type per index, and finally upgrade to Elasticsearch 6.
I’m afraid the connector’s migration guide glosses over these details. That’s something we should address.