# Problems with ElasticSearch together with CouchDB

**URL:** <https://discuss.elastic.co/t/problems-with-elasticsearch-together-with-couchdb/4722>\
**Category:** Elasticsearch\
**Created:** [June 28, 2011, 10:07am UTC](https://discuss.elastic.co/t/problems-with-elasticsearch-together-with-couchdb/4722 "2011-06-28T10:07:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Daniele\_Testa](https://avatars.discourse-cdn.com/v4/letter/d/5fc32e/32.png) [@Daniele\_Testa](https://discuss.elastic.co/u/Daniele_Testa)\
**Post date:** [June 28, 2011, 10:07am UTC](https://discuss.elastic.co/t/problems-with-elasticsearch-together-with-couchdb/4722/1 "2011-06-28T10:07:00Z")

</div>

Hi,

I am using CouchDB as main DB with Elasticsearch (using River CouchDB  
plugin) for fulltext search.

I have a database called "apps" where I have a list of mobile  
applications.

I have created a filter that basically only hits documents that has  
doc.type=="app"

When doing a curl:

curl [http://localhost:5984/apps/\_changes?filter=replication/apps](http://localhost:5984/apps/_changes?filter=replication/apps)

It seems to work fine, 50 apps is returned.

I have then setup Elasticsearch to use the database "apps" and the  
filter "replication/apps"

But in Elasticsearch, I only get 7 "apps", not 50.

Another problem seems to be that Elasticsearch cannot handle nested  
objects correctly.

eg. Many of the mobile applications have screenshots like $doc-

> screenshot[0]-\>type = 'png'

When watching the documents in Elasticsearch, it seems like that neep  
nested "type" has overridden the $doc-\>type and show it as "png"  
instead of "app".

Does anyone have experience with any of this?

Regards,  
Daniele

---

<div class="post-metadata">

**Author:** ![Mahendra\_M](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mahendra_m/32/3128_2.png) [@Mahendra\_M](https://discuss.elastic.co/u/Mahendra_M)\
**Post date:** [July 4, 2011, 6:33am UTC](https://discuss.elastic.co/t/problems-with-elasticsearch-together-with-couchdb/4722/2 "2011-07-04T06:33:17Z")

</div>

Hi Daniele,

I use CouchDB River in production and have not seen this issue.

Would it be possible for you to share your 'filter' and a sample doc  
which is getting  
indexed ?

Also, can you turn on debug logs in Elasticsearch (conf/logging.yml)  
and then setup the  
river plugin again. The debug outputs may give some hints on what is  
going wrong.

Regards,  
Mahendra

On Tue, Jun 28, 2011 at 3:37 PM, Daniele Testa [daniele.testa@gmail.com](mailto:daniele.testa@gmail.com) wrote:

> Hi,
> 
> I am using CouchDB as main DB with Elasticsearch (using River CouchDB  
> plugin) for fulltext search.
> 
> I have a database called "apps" where I have a list of mobile  
> applications.
> 
> I have created a filter that basically only hits documents that has  
> doc.type=="app"
> 
> When doing a curl:
> 
> curl [http://localhost:5984/apps/\_changes?filter=replication/apps](http://localhost:5984/apps/_changes?filter=replication/apps)
> 
> It seems to work fine, 50 apps is returned.
> 
> I have then setup Elasticsearch to use the database "apps" and the  
> filter "replication/apps"
> 
> But in Elasticsearch, I only get 7 "apps", not 50.
> 
> Another problem seems to be that Elasticsearch cannot handle nested  
> objects correctly.
> 
> eg. Many of the mobile applications have screenshots like $doc-
> 
> > screenshot[0]-\>type = 'png'
> 
> When watching the documents in Elasticsearch, it seems like that neep  
> nested "type" has overridden the $doc-\>type and show it as "png"  
> instead of "app".
> 
> Does anyone have experience with any of this?
> 
> Regards,  
> Daniele

---

<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, 4:01am UTC](https://discuss.elastic.co/t/problems-with-elasticsearch-together-with-couchdb/4722/3 "2017-07-06T04:01:55Z")

</div>


