Problems with ElasticSearch together with CouchDB


(Daniele Testa) #1

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

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


(Mahendra M) #2

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 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

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


(system) #3