couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Kimber <>
Subject RE: FW: Am I doing something fundamentally wrong?
Date Fri, 25 May 2012 15:04:40 GMT

This is great and makes sense, thanks.

I'm just getting to grips with JS so Erlang may be a bit a of a stretch at the moment, but
will bear it in mind

Again thanks for clarifying that our docs are "very huge", makes me feel better as in it not
my JS skills or set-up that are the issue.

I have couch-lucene installed and finding it very useful 

Again thanks, your answer are much appreciated


-----Original Message-----
From: Matthieu Rakotojaona [] 
Sent: 25 May 2012 15:20
Subject: Re: FW: Am I doing something fundamentally wrong?


No, indeed, emitting the whole doc in either key or value would be a
foolish idea =]
I suggested that you emit the "maven-build-profile" string. Supposing
the view woulb be called "by_activity", you will then be able to query
the view like that :

GET /dbname/_design/ddoc/_view/by_activity?key="maven-build-profile"

This will give you access to all the docs for which you emitted the
string. In fact the string emitting serves as the filtering you need.
This output is then fed as-is into the list; that is why you'll want
to use "&include_docs=true" to add the whole document to the data that
is fed into the list.

I think you see now that you can replace this very simple view with
the couchdb-integrated "_all_docs" view, if all your docs have the
"maven-build-profile" property. The view I suggested needs very few
hard disk space, but the "_all_docs" requires even less because it's 0

Now, for the CPU usage part, as a few emails in this mailing list have
said, it might be an issue with the translation of the documents from
disk format to JSON to parse them in the map function. I don't know
about erlang views[0], but if the view is very simple, you could try
it : I believe there is no translation to JSON, the docs are directly
read from disk and parsed through the view. If it does behave like
that, you will highly benefit from it, because your docs are very
huge, and have to be completely translated before parsing.

But in the end, you are just working around the somewhat static nature
of CouchDB; as advised, a full-text search engine[1] should be more
adapted to what you want to do.


View raw message