New site powered by CouchDB - magnifeast.com

2009-08-07 Thread Scott Shumaker
We've just launched our site - Magnifeast (http://www.magnifeast.com) - which uses CouchDB as its primary persistence mechanism. Magnifeast is a site that lets you order online from over 500 restaurants. We're initially launching in Los Angeles, but plan to expand to other cities soon. CouchDB

Best practice for date dependend maps

2009-08-07 Thread Mario Müller
Hi folks, I'm new to couchdb (so please don't hurt me ;)). I want to build a view of valid documents. Valid, in this case, means that those documents have a valid_from and a valid_until date and now must be within this range. I've written a map script to do the work for me, but I do not

Re: Best practice for date dependend maps

2009-08-07 Thread Robert Newson
I don't think that will work. the new Date().getTime() is evaluated once for each document, so your expectation that documents will fall out of the view as time moves on will not be met; unchanged documents are not updated in the view. All I can think of is two views with a client-side join.

integrating couchdb-lucene and regular _shows and _lists

2009-08-07 Thread Nitin Borwankar
Hello all, I am working on a BibJSON browsing couchapp, for which couchdb-lucene search is critical as is the ability to do counts and grouping (which lucene doesn't do - yes solr does, I know). It would be ideal if couchdb-lucene results could be integrated with the _list/_show functionality of

Re: Best practice for date dependend maps

2009-08-07 Thread Nitin Borwankar
Hi Mario, Looks fine to me ( I didn't look at the regex detials just at the couch stuff. Except you may want to add a check like if(doc.valid_from) {} if(doc.valid_until) {...} This way if a doc doesn't have one of these it will just be skipped. Otherwise you might get a can't format

Properties with special characters

2009-08-07 Thread Tim Somers
Hi all, I'm using couchdb to store some localization strings. A typical document looks like this: { _id:1962a07f8a56ba935f6d5370928dd483, _rev:3-2493355664, default:closed, doc_type:multiLangString, fr-BE:cl\u00f4tur\u00e9, nl-BE:afgesloten } So far, so good. Now, I'm

Re: Properties with special characters

2009-08-07 Thread Antony Blakey
On 07/08/2009, at 8:25 PM, Tim Somers wrote: function(doc) { if (doc.doc_type == multiLangString) { emit(doc.default, { default: doc.default, en-GB: doc.en-GB, fr-BE: doc.fr-BE, nl-BE: doc.nl-BE }); } } In javascript, doc.en-GB

Re: Properties with special characters

2009-08-07 Thread Tim Somers
On Fri, Aug 7, 2009 at 13:09, Antony Blakey antony.bla...@gmail.com wrote: On 07/08/2009, at 8:25 PM, Tim Somers wrote: function(doc) { if (doc.doc_type == multiLangString) { emit(doc.default, { default: doc.default, en-GB: doc.en-GB, fr-BE:

Re: Properties with special characters

2009-08-07 Thread Brian Candler
On Fri, Aug 07, 2009 at 08:39:14PM +0930, Antony Blakey wrote: On 07/08/2009, at 8:25 PM, Tim Somers wrote: function(doc) { if (doc.doc_type == multiLangString) { emit(doc.default, { default: doc.default, en-GB: doc.en-GB, fr-BE: doc.fr-BE,

Re: MIME dump/load and implications

2009-08-07 Thread Andrew Melo
Below Andrew Melo Sent from my secret fortress. On Aug 7, 2009, at 7:16, Brian Candler b.cand...@pobox.com wrote: However it can also have attachments, which are binary clean and each have their own MIME type. Do couch attachments have to be binary clean? Like 7bit clean?

Re: integrating couchdb-lucene and regular _shows and _lists

2009-08-07 Thread Robert Newson
Adding _show and _list support is on my list for the 0.4 release. If I get time at the weekend, I might get this done. B. On Fri, Aug 7, 2009 at 11:37 AM, Nitin Borwankarni...@borwankar.com wrote: Hello all, I am working on a BibJSON browsing couchapp, for which couchdb-lucene search is

Mochiweb parse bug?

2009-08-07 Thread Nils Breunese
Hello all, I have a strange problem. I can access a list view just fine from Firefox and curl, but when doing an JSTL include from a JSP page (using c:import) CouchDB returns a HTTP 500 error for the exact same URL. I enabled debug logging in CouchDB and get this for a request from Firefox

Re: Best practice: adding an app specific chunk to a document

2009-08-07 Thread eric casteleijn
Justin Walgran wrote: I'm building a couch app that works with it's own database of documents or as an add-in to any existing database of documents. In the case where the app is added to an existing database, I would like to scan the documents and add a little meta section to each one for

Help with CouchDB query

2009-08-07 Thread David Nolen
So far I've really been loving CouchDB but I'm stumped on the best way to implement a particular query for our application. It's not clear to me whether what I'm trying to do can be done with views or is best handled by couchdb-lucene. Basically in our software users create documents which they

Re: Best practice: adding an app specific chunk to a document

2009-08-07 Thread Justin Walgran
Eric, that is exactly the type of thing I was looking to support in my app. Are other app developers using the convention of storing app specific data under a doc.application_annotations.[namespace] key? It seems like agreeing to a standard is a good way to go. That said, if I had a database of

Re: New site powered by CouchDB - magnifeast.com

2009-08-07 Thread Tommy Chheng
Great post and site, Scott! How are you handling the geo-search with CouchDB? Tommy On Aug 7, 2009, at 1:21 AM, Scott Shumaker wrote: We've just launched our site - Magnifeast (http://www.magnifeast.com) - which uses CouchDB as its primary persistence mechanism. Magnifeast is a site that

Re: integrating couchdb-lucene and regular _shows and _lists

2009-08-07 Thread Nitin Borwankar
Hi Robert, That would be great! Then I won't have to do this two step. Nitin 37% of all statistics are made up on the spot - Nitin Borwankar nborwan...@gmail.com On Fri, Aug 7, 2009 at 5:46 AM, Robert Newson

Re: Help with CouchDB query

2009-08-07 Thread Chris Anderson
On Fri, Aug 7, 2009 at 8:05 AM, David Nolendnolen.li...@gmail.com wrote: So far I've really been loving CouchDB but I'm stumped on the best way to implement a particular query for our application. It's not clear to me whether what I'm trying to do can be done with views or is best handled by

Re: Best practice for date dependend maps

2009-08-07 Thread Chris Anderson
On Fri, Aug 7, 2009 at 2:15 AM, Mario Müllermario.mueller@me.com wrote: Hi folks, I'm new to couchdb (so please don't hurt me ;)). I want to build a view of valid documents. Valid, in this case, means that those documents have a valid_from and a valid_until date and now must be within

How Views Work

2009-08-07 Thread Matt King
Hi all, I have question about how views work. I read that when you create a view, CouchDB indexes it so it's faster on the next request. But if I pass in startkey and endkey, does it only index the docs that are returned? Or is the entire list indexed and CouchDB returns the offsets as

Re: Mochiweb parse bug?

2009-08-07 Thread Chris Anderson
On Fri, Aug 7, 2009 at 5:58 AM, Nils Breunesen.breun...@vpro.nl wrote: Hello all, I have a strange problem. I can access a list view just fine from Firefox and curl, but when doing an JSTL include from a JSP page (using c:import) CouchDB returns a HTTP 500 error for the exact same URL. I

Re: Help with CouchDB query

2009-08-07 Thread Chris Anderson
On Fri, Aug 7, 2009 at 10:54 AM, David Nolendnolen.li...@gmail.com wrote: On Fri, Aug 7, 2009 at 12:40 PM, Chris Anderson jch...@apache.org wrote: Paginating over merged views is not trivial. For the case of 1 and 2, you could do that. For the case of 3 and 4, one way to implement this is by

Re: New site powered by CouchDB - magnifeast.com

2009-08-07 Thread Scott Shumaker
Since restaurant delivery regions can be multiple sets of arbitrary polygons, our geo-search happens in our search engine (that pulls docs from Couch). We basically have 'gridded' up the city with fairly large grid cells. In each grid cell, we keep track of which restaurants deliver to all or

Setting PID file path in 0.9.1

2009-08-07 Thread Zachary Zolton
Ohai, Did the config change in 0.9.1, for where I need to set the path to CouchDB's PID file? In my old CouchDB 0.9 server build script, I was using this: touch /usr/local/var/run/couchdb.pid chown couchdb:couchdb /usr/local/var/run/couchdb.pid mkdir -p /usr/local/etc/default cat

Re: Help with CouchDB query

2009-08-07 Thread David Nolen
I got this working afternoon. Seems like couchdb-lucene is the way to go for what I'm describing. It was easy to set up and is cleanly integrated with CouchDB. On Fri, Aug 7, 2009 at 2:04 PM, Chris Anderson jch...@apache.org wrote: On Fri, Aug 7, 2009 at 10:54 AM, David

Re: Setting PID file path in 0.9.1

2009-08-07 Thread Noah Slater
On Fri, Aug 07, 2009 at 04:07:59PM -0500, Zachary Zolton wrote: Did the config change in 0.9.1, for where I need to set the path to CouchDB's PID file? Yep, it was noted in the CHANGES file: * PID file directory is now created by the SysV/BSD daemon scripts. However after successfully

Re: Setting PID file path in 0.9.1

2009-08-07 Thread Zachary Zolton
So, if sudo make install works, then I should have a PID file at that path? On Aug 7, 2009, at 8:20 PM, Noah Slater nsla...@apache.org wrote: On Fri, Aug 07, 2009 at 04:07:59PM -0500, Zachary Zolton wrote: Did the config change in 0.9.1, for where I need to set the path to CouchDB's PID

Re: Setting PID file path in 0.9.1

2009-08-07 Thread Noah Slater
On Fri, Aug 07, 2009 at 09:36:10PM -0500, Zachary Zolton wrote: So, if sudo make install works, then I should have a PID file at that path? If you have a running CouchDB instance, yes. -- Noah Slater, http://tumbolia.org/nslater

Re: I can’t relax. I broke my couch upgrading depe ndencies. What might this error mean?

2009-08-07 Thread Oliver Boermans
Okay - I’m finally getting back to this 2009/8/7 Chris Anderson jch...@apache.org: As Noah mentioned on another thread, these wiki pages may be useful. http://wiki.apache.org/couchdb/Troubleshooting I followed these instructions (without change) here is the info they suggested I share: Dual

Re: I can’t relax. I b rok e my couch upgrading dependencies. What might this error mean?

2009-08-07 Thread Noah Slater
On Sat, Aug 08, 2009 at 12:57:24PM +0930, Oliver Boermans wrote: $ sudo -i -u couchdb couchdb sudo: unable to change directory to /usr/local/var/lib/couchdb: No such file or directory I'm working on the CouchDB book as we speak, and I literally just wrote: You should make sure that the