# Couchbase replication issue with Elasticsearch

**URL:** <https://discuss.elastic.co/t/couchbase-replication-issue-with-elasticsearch/16338>\
**Category:** Elasticsearch\
**Created:** [March 12, 2014, 9:49pm UTC](https://discuss.elastic.co/t/couchbase-replication-issue-with-elasticsearch/16338 "2014-03-12T21:49:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joshua\_Dixon](https://avatars.discourse-cdn.com/v4/letter/j/a8b319/32.png) [@Joshua\_Dixon](https://discuss.elastic.co/u/Joshua_Dixon)\
**Post date:** [March 12, 2014, 9:49pm UTC](https://discuss.elastic.co/t/couchbase-replication-issue-with-elasticsearch/16338/1 "2014-03-12T21:49:08Z")

</div>

Hello there, I'm having an issue with my Elasticsearch replication of my  
Couchbase DB.

Certain documents in my DB are not being replicated correctly. Rather than  
replicating as full couchbase documents, there is an entry with \_type of  
couchbaseCheckpoint pointing to certain documents. These checkpoints never  
seem to update or grab the documents correctly, even after a refresh. This  
seems to occur at random, with some documents replicating correctly and  
being stored as full couchbaseDocuments, while others stay as these  
checkpoints. I'm not seeing any errors related to this in my logs at all.

I'm not sure if it matters, but my document structure is a little odd. My  
code is working with 4 primary objects which are being placed into a  
wrapper object before being stored in the database. So, each couchbase  
document represents one of these wrappers with an entity field which  
represents my primary object. The entity field of a given wrapper is  
ambiguous as to which kind of object it contains, however there is another  
field in the wrapper which indicates the object type. A typical document  
will look like this:  
{  
"Datafield":"Somedata  
"JSONType":"Sometype",  
"Entity": {  
[Primary object specific fields here]  
}  
}

Would the ambiguous fields in the Entity object be causing problems with  
Elasticsearch? If not, why is my Elasticsearch not properly replicating  
these documents?

--  
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](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/edc96b90-c6b3-40ac-b8e0-af85b16b0561%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/edc96b90-c6b3-40ac-b8e0-af85b16b0561%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [March 13, 2014, 6:12am UTC](https://discuss.elastic.co/t/couchbase-replication-issue-with-elasticsearch/16338/2 "2014-03-13T06:12:01Z")

</div>

I never tested that kind of doc (unamed arrays) and I think it might be your issue.

Could you test indexing a single doc without couchbase and see if issue comes from here?

Also you didn't mention which versions you are using (es, couchbase plugin)

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

> Le 12 mars 2014 à 22:49, Joshua Dixon [dixonj0930@gmail.com](mailto:dixonj0930@gmail.com) a écrit :
> 
> Hello there, I'm having an issue with my Elasticsearch replication of my Couchbase DB.
> 
> Certain documents in my DB are not being replicated correctly. Rather than replicating as full couchbase documents, there is an entry with \_type of couchbaseCheckpoint pointing to certain documents. These checkpoints never seem to update or grab the documents correctly, even after a refresh. This seems to occur at random, with some documents replicating correctly and being stored as full couchbaseDocuments, while others stay as these checkpoints. I'm not seeing any errors related to this in my logs at all.
> 
> I'm not sure if it matters, but my document structure is a little odd. My code is working with 4 primary objects which are being placed into a wrapper object before being stored in the database. So, each couchbase document represents one of these wrappers with an entity field which represents my primary object. The entity field of a given wrapper is ambiguous as to which kind of object it contains, however there is another field in the wrapper which indicates the object type. A typical document will look like this:  
> {  
> "Datafield":"Somedata  
> "JSONType":"Sometype",  
> "Entity": {  
> [Primary object specific fields here]  
> }  
> }
> 
> ## Would the ambiguous fields in the Entity object be causing problems with Elasticsearch? If not, why is my Elasticsearch not properly replicating these documents?
> 
> 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](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/edc96b90-c6b3-40ac-b8e0-af85b16b0561%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/edc96b90-c6b3-40ac-b8e0-af85b16b0561%40googlegroups.com).  
> For more options, visit [https://groups.google.com/d/optout](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](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/59C5256B-85D5-4855-9959-5DD3056A1C28%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/59C5256B-85D5-4855-9959-5DD3056A1C28%40pilato.fr).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Arun\_M\_R](https://avatars.discourse-cdn.com/v4/letter/a/e19b73/32.png) [@Arun\_M\_R](https://discuss.elastic.co/u/Arun_M_R)\
**Post date:** [October 9, 2014, 9:52am UTC](https://discuss.elastic.co/t/couchbase-replication-issue-with-elasticsearch/16338/3 "2014-10-09T09:52:41Z")

</div>

Hai,  
i also have the same problem with couchbase elasticsearch replication.  
It is possible to replicate all sample bucket that with couchbase, but i  
can not able to make replication with a new bucket.

_versions_

_couchbase 3.0.1elasticsearch 1.3 couchbase elasticsearch plugin 2.0.0_

_Body of document:_

{  
"name":"xxx",  
"age": "1",  
}

On Thursday, March 13, 2014 11:42:01 AM UTC+5:30, David Pilato wrote:

> I never tested that kind of doc (unamed arrays) and I think it might be  
> your issue.
> 
> Could you test indexing a single doc without couchbase and see if issue  
> comes from here?
> 
> Also you didn't mention which versions you are using (es, couchbase plugin)
> 
> --  
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> 
> Le 12 mars 2014 à 22:49, Joshua Dixon \<[dixon...@gmail.com](mailto:dixon...@gmail.com) \<javascript:\>\>  
> a écrit :
> 
> Hello there, I'm having an issue with my Elasticsearch replication of my  
> Couchbase DB.
> 
> Certain documents in my DB are not being replicated correctly. Rather than  
> replicating as full couchbase documents, there is an entry with \_type of  
> couchbaseCheckpoint pointing to certain documents. These checkpoints never  
> seem to update or grab the documents correctly, even after a refresh. This  
> seems to occur at random, with some documents replicating correctly and  
> being stored as full couchbaseDocuments, while others stay as these  
> checkpoints. I'm not seeing any errors related to this in my logs at all.
> 
> I'm not sure if it matters, but my document structure is a little odd. My  
> code is working with 4 primary objects which are being placed into a  
> wrapper object before being stored in the database. So, each couchbase  
> document represents one of these wrappers with an entity field which  
> represents my primary object. The entity field of a given wrapper is  
> ambiguous as to which kind of object it contains, however there is another  
> field in the wrapper which indicates the object type. A typical document  
> will look like this:  
> {  
> "Datafield":"Somedata  
> "JSONType":"Sometype",  
> "Entity": {  
> [Primary object specific fields here]  
> }  
> }
> 
> Would the ambiguous fields in the Entity object be causing problems with  
> Elasticsearch? If not, why is my Elasticsearch not properly replicating  
> these documents?
> 
> --  
> 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/edc96b90-c6b3-40ac-b8e0-af85b16b0561%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/edc96b90-c6b3-40ac-b8e0-af85b16b0561%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/edc96b90-c6b3-40ac-b8e0-af85b16b0561%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/edc96b90-c6b3-40ac-b8e0-af85b16b0561%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](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](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/c12293f1-f965-48eb-a78e-3fe22be59f5a%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/c12293f1-f965-48eb-a78e-3fe22be59f5a%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 12:57am UTC](https://discuss.elastic.co/t/couchbase-replication-issue-with-elasticsearch/16338/4 "2017-07-06T00:57:22Z")

</div>


