couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Wright <>
Subject Optionally including docs in view results
Date Mon, 04 Aug 2008 18:31:37 GMT
Hi all.

I'm currently building a search engine with couch. The search criteria 
is particularly complicated, so a view is generated at search-time, with 
the bare minimum information emitted (if it hasn't been indexed already).
This all works fine, however trying to display the results introduces a 
seemingly unnecessary overhead..

Because there will potentially be a lot of views, emitting the whole 
document isn't really an option as way too much disk space will be 
wasted. Currently, the only other option is to iterate through the view 
results and query each hit individually for the full document body. As 
I'm working in PHP, there's a fairly substantial crunch involved in 
querying a large number of single records in a loop.

Is there a way (or is a way planned) for the documents to be optionally 
attached to a view's result rows via a query string argument?




"key": "key"
"value": { "my_emitted_data":123 }
"doc": { -- document data here -- }

I know this is a relatively edge case.. it'd be really handy to have though!
Any thoughts / suggestions?


View raw message