couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From He Shiming <>
Subject View design strategy, what to emit?
Date Thu, 23 Dec 2010 13:53:13 GMT

I'm new to CouchDB. I'm trying to figure out the best strategy toward
view design, mainly regarding the type of content to emit.

Let's say the view searches across documents for a keyword. It's okay
to emit the entire doc or merely the docid as map result. I'm working
with couchdb-python here, and it appears complicated to convert
ViewResults to Documents which I'm comfortable to work with. So I
choose to emit only the docid, and run another loop to retrieve the
actual document.

I'm wondering if this is a good approach. It'll require more API
calls, will it be slower?

And I wonder if emitting only docid is more space-efficiently (in
terms of view-occupied storage) than emitting the whole doc?

Best regards,
He Shiming

View raw message