Temporary view, fully indexed, would perform faster of course. Remember that Couchtato works by iterating all documents in the database, so there's a cost there on top of network delay when retrieving those documents via http.
However, if you want to find a document id where field foo === 'bar', then Couchtato is a good solution because you can just script a function that checks doc.foo === 'bar' and log the id, then fire off 'couchtato iterate -u http://your/db' Using Couchtato would require much less effort compared to adding/updating a view in a design document just to do a once-off search. Not to mention that modifying the design document might trigger view reindexing, etc. Another benefit of Couchtato is that one doesn't need to know about CouchDB view/design document in order to find that document. We have testers on our projects using Couchtato to find / count documents based on their test scenario, they don't need to modify CouchDB design document. Yea, it takes some time to get used to saying Couchtato :). On Thu, Jun 9, 2011 at 4:42 PM, Mark Hahn <[email protected]> wrote: > Would it be faster to use couchtater to run a one-off search than using a > temporary view? > > P.S. Couchtato does not roll off the tongue. > > On Wed, Jun 8, 2011 at 11:32 PM, Cliffano Subagio <[email protected] > >wrote: > > > Hi Mark, > > > > No, it doesn't read the db file directly. > > > > Couchtato interacts with CouchDB via couchdb's http api > > http://wiki.apache.org/couchdb/HTTP_Document_API using Cradle > > https://github.com/cloudhead/cradle . > > It reads the documents using linked list pagination as described here > > http://guide.couchdb.org/draft/recipes.html#fast , Couchtato then > applies > > all the functions described in its config file (on filesystem) on each > > document one by one. > > Writing / updating / deleting document are also done via http api. > > > > It can read about 230000 documents (CouchDB server on an external > network) > > in about 2.5 minutes, so that's about 1533 docs per second. > > > > The intention of this tool is to provide an easy way to 'do something' > with > > documents in couchdb without having to touch the design document on > couchdb > > itself. > > > > > > Cheers, > > Cliff. > > > > On Thu, Jun 9, 2011 at 3:06 PM, Mark Hahn <[email protected]> wrote: > > > > > I assume it reads the db file directly. How does it do writes? > > > > > > On Wed, Jun 8, 2011 at 5:51 AM, Cliffano Subagio <[email protected]> > > > wrote: > > > > > > > Hi all, > > > > > > > > I'd like to let you know about Couchtato - > > > > https://github.com/cliffano/couchtato > > > > It's a command line tool (using nodejs) that allows you to apply > > > javascript > > > > functions against all documents in a database, 'offline' in the sense > > > that > > > > those javascript functions live in a couchtato config file on your > > local > > > > filesystem instead of a view on CouchDB server. > > > > > > > > Couchtato is also handy for: > > > > - finding documents with a certain criteria > > > > - generating database dumps > > > > - updating, deleting, or counting documents > > > > > > > > Since Couchtato is just a simple command line tool, the users won't > > need > > > to > > > > know much about CouchDB / views / design documents, they only need to > > > know > > > > the database URL and to create some javascript functions - simple > > enough > > > > for > > > > non-developers. > > > > > > > > Hopefully this tool can be useful for someone out there. > > > > > > > > Cheers, > > > > Cliff > > > > > > > > > > > > > > > > -- > > > Mark Hahn > > > Website Manager > > > [email protected] > > > 949-229-1012 > > > > > > > > > -- > Mark Hahn > Website Manager > [email protected] > 949-229-1012 >
