RE: One view per "query"?

2011-06-10 Thread Nils Breunese
The query arguments are startkey and endkey, not startKey and endKey. You might want to just use key= in this case though. http://wiki.apache.org/couchdb/HTTP_view_API#Querying_Options Nils. Van: Peter Nolan [peterwno...@gmail.com] Verzonden: vrijdag 10 j

Re: JSON Patch Internet Draft 01

2011-06-10 Thread Paul C. Bryan
On Fri, 2011-06-10 at 11:42 -0700, Eli Stevens (Gmail) wrote: > Is it possible to use those outside of the context of an HTTP request? Definitely, but then concurrency control would be something that the alternate implementation would be required to provide. In our application, we use a "rev" (

Re: JSON Patch Internet Draft 01

2011-06-10 Thread Paul C. Bryan
Per JSON specification, emphasis mine: “An object is an unordered collection of zero or more name/value pairs…” Any ordering difference the xdelta approach would catch would therefore be spurious. Paul On Fri, 2011-06-10 at 14:06 -0400, Dave Bender wrote: > This may be a stupid question, but h

Re: JSON Patch Internet Draft 01

2011-06-10 Thread Eli Stevens (Gmail)
On Fri, Jun 10, 2011 at 10:20 AM, Paul C. Bryan wrote: > I am inclined to leverage HTTP conditions (e.g. If-Match) to ensure > resource state rather than try to build additional tests and concurrency > mechanisms into the patch format. Is it possible to use those outside of the context of an HTTP

Re: JSON Patch Internet Draft 01

2011-06-10 Thread Dave Bender
This may be a stupid question, but how does the RFC account for the order in which JSON map elements appear? Are these two JSON docs considered equivalent: A: {"a":1,"b":2} B: {"b":2,"a":1} The xdelta approach would catch a difference in ordering whereas the RFC version would not. On Fri, Jun

Re: JSON Patch Internet Draft 01

2011-06-10 Thread Paul C. Bryan
On Thu, 2011-06-09 at 18:03 -0700, Jens Alfke wrote: > To play devil’s advocate: Is this format really necessary? From the draft: > > >The HTTP PATCH [RFC5789] specification extends HTTP with a new method > >to perform partial modifications to resources. A JSON-based patch > >documen

Re: JSON Patch Internet Draft 01

2011-06-10 Thread Paul C. Bryan
On Thu, 2011-06-09 at 16:39 -0700, Eli Stevens (Gmail) wrote: [snip] > I think that it should be possible to specify what value should be > present when removing something. Text-based patches don't just say > "remove line 42" they also spell out what content is expected to be > there before rem

Re: JSON Patch Internet Draft 01

2011-06-10 Thread Paul C. Bryan
On Thu, 2011-06-09 at 21:23 -0600, Kris Zyp wrote: > I believe UTF-8 encoding for URLs is already mandated by RFC 3986. Just re-read the RFC, and yep, it's mandated. Paul

Re: One view per "query"?

2011-06-10 Thread Daniele Testa
Ok, I will try some different things and see how it goes :) No, the music thing was just an example. I am working on something completely different. Regards, Daniele 2011/6/10 Peter Nolan : >> >> in regards to '10 million documents' >> > > > >> not necessarily.  Say you want to find a doc whose

Re: One view per "query"?

2011-06-10 Thread Peter Nolan
> > in regards to '10 million documents' > > not necessarily. Say you want to find a doc whose field of 'artist' is > 'dylan' > you can create a view called byArtist whose code looks like the following. function (doc) { if (doc.artist) { emit(doc.artist,otherStuffYouWantToKnow)

Re: One view per "query"?

2011-06-10 Thread Peter Nolan
you might want to check out filter functions from the changes feed - this would allow you to do more 'intense' querying from the database. http://guide.couchdb.org/draft/notifications.html though, from my experience, it seems that using the filte

Re: One view per "query"?

2011-06-10 Thread Daniele Testa
Hmm, if I have 10 million songs in my database, wouldn't that make couchDB send all those 10 million documents to the client for the sort? That sounds crazy to me :) Regards, Daniele 2011/6/10 MK : > On Fri, 10 Jun 2011 12:05:20 +0200 > Daniele Testa wrote: >> That would mean that I need 3*4=12

Re: One view per "query"?

2011-06-10 Thread MK
On Fri, 10 Jun 2011 12:05:20 +0200 Daniele Testa wrote: > That would mean that I need 3*4=12 views to accomodate all those > different "queries"? Only if you have to have your application 100% served directly from couch. However, IMO the view and shows make a lot more sense as ancillary functions

Re: Help with data modelling

2011-06-10 Thread Sean Copenhaver
Certainly not transactional, but the all_or_nothing option sounds very useful so long as you understand that conflicts will occur and are already handling those. Which is of course something you'll need to think about if replication is involved as well. Alternatively I see value in the default mod

Re: Help with data modelling

2011-06-10 Thread Robert Newson
Yes, that's what I mean. The word "transactional" means far more than "sent in the same HTTP request". :) B. On 10 June 2011 14:16, Sean Copenhaver wrote: > Ah I think I see what you mean: > > "*all-or-nothing* - To use this mode, include "all_or_nothing":true as part > of the request. In the ca

Re: One view per "query"?

2011-06-10 Thread Sean Copenhaver
You can also hit the views with a 'stale=update_after' if on 1.1. On Fri, Jun 10, 2011 at 9:15 AM, Owen Marshall wrote: > At Fri, 10 Jun 2011 12:05:20 +0200, > Daniele Testa wrote: > > > Another question I have is what benefit do I get when putting several > > views in one design document? > > Vi

Re: Help with data modelling

2011-06-10 Thread Sean Copenhaver
Ah I think I see what you mean: "*all-or-nothing* - To use this mode, include "all_or_nothing":true as part of the request. In the case of a power failure, when the database restarts either all the changes will have been saved or none of them. However, it does not do conflict checking, so the docu

Re: One view per "query"?

2011-06-10 Thread Owen Marshall
At Fri, 10 Jun 2011 12:05:20 +0200, Daniele Testa wrote: > Another question I have is what benefit do I get when putting several > views in one design document? Views within the same design document are indexed together, saving space and speeding up view updates. > As I understood, this just ca

Re: Help with data modelling

2011-06-10 Thread Robert Newson
The bulk documents API is not transactional in any useful sense. On 10 June 2011 13:42, Sean Copenhaver wrote: > It sounds like you are trying to combine things into a single document. What > were your concerns that you would want to put all manufacturers in a single > document or all log entries

Re: Help with data modelling

2011-06-10 Thread Sean Copenhaver
It sounds like you are trying to combine things into a single document. What were your concerns that you would want to put all manufacturers in a single document or all log entries for example? That is instead of in a view query result? I don't think there would be an issue with having everything

LoveSeat stoped working after 1.1.0 upgrade

2011-06-10 Thread Daniele Testa
Hi, I was using the CouchDB client LoveSeat for 1.0.x but it seems to not work with 1.1.0 Connecting to the database works, but I get error when trying to insert a new View to an existing Design Document. Using Futon for many tasks is very cumbersome. Updating views etc. I have tried to compile

Re: About map/reduce chaining

2011-06-10 Thread Gabor Ratky
Fabio, while chaining map/reduce views sounds useful, we found it easy to work around it by updating our documents with the derived data. Subsequent views can use that derived information in your documents. This also breaks down your chain into well-defined steps, which you can apply to your doc

Re: About map/reduce chaining

2011-06-10 Thread Robert Newson
This feature does not exist in any release of Apache CouchDB to date. B. On 10 June 2011 11:25, Fabio Di Bernardini wrote: > I found an old > mailof > Chris Anderson about a patch enabling views c

About map/reduce chaining

2011-06-10 Thread Fabio Di Bernardini
I found an old mailof Chris Anderson about a patch enabling views chaining. I don't find other documentations since then. There are news about views chaining with latest 1.1 release? Thank you.

Help with data modelling

2011-06-10 Thread Javier Rodríguez Escolar
Hello, I'm a CouchDB newbie trying to migrate an existing application from SQL to NoSQL. I have designed different approaches to model the CouchDB documents and I have been leafing through a couple of books [1],[2] in order to figure out the possible problems each approach might cause, but I still

Re: CouchDB embedded in Eclipse - current status?

2011-06-10 Thread Benoit Chesneau
On Friday, June 10, 2011, Marcel Bruch wrote: > > On 10.06.2011, at 11:14, Benoit Chesneau wrote: > >> On Wed, Jun 8, 2011 at 10:14 PM, Marcel Bruch >> wrote: > In any case, I will give it a try and create a simple feature + plug-in > for Eclipse that packages the latest CouchDB w/ Erla

Re: One view per "query"?

2011-06-10 Thread Daniele Testa
Ok, thanks. It will be _a lot_ of views then. I mean, you might want to select songs based on title, album or genre at the same time as you can order by title, album, genre or insert_date That would mean that I need 3*4=12 views to accomodate all those different "queries"? Another question I hav

Re: One view per "query"?

2011-06-10 Thread Clement Hallet
I think you're right > startkey=[null, null, 0, null]&endkey=[null, null, {}, null] that query would still return results, the ones wich match all the conditions : - doc.album = null - doc.genre = null - some range with doc.insert_date, doc.title (not sure what it would really use) So if

One view per "query"?

2011-06-10 Thread Daniele Testa
Hi all, I just want to check with you guys that I understand things correctly. Lets say I have a database that stores music songs. Each song has a "title", "insert_date", "album", "genre". Now, if I want to do these "queries": "All songs that belongs to album=X ordered by title" "All songs tha

Re: CouchDB embedded in Eclipse - current status?

2011-06-10 Thread Marcel Bruch
On 10.06.2011, at 11:14, Benoit Chesneau wrote: > On Wed, Jun 8, 2011 at 10:14 PM, Marcel Bruch > wrote: In any case, I will give it a try and create a simple feature + plug-in for Eclipse that packages the latest CouchDB w/ Erlang runtime for MacOSX + code that starts CouchDB

Re: Run Local Button - Improving End User Experience

2011-06-10 Thread Benoit Chesneau
On Fri, Jun 10, 2011 at 11:08 AM, Benoit Chesneau wrote: > On Thu, Jun 9, 2011 at 1:43 AM, Randall Leeds wrote: >> On Wed, Jun 8, 2011 at 15:57, Alexander Gabriel wrote: >>> awesome. What a killer idea. I want it! >>> >>> Alex >>> >>> >>> >>> 2011/6/9 Ryan Ramage >>> I am in the mist of a

Re: CouchDB embedded in Eclipse - current status?

2011-06-10 Thread Benoit Chesneau
On Wed, Jun 8, 2011 at 10:14 PM, Marcel Bruch wrote: >>> In any case, I will give it a try and create a simple feature + plug-in for >>> Eclipse that packages the latest CouchDB w/ Erlang runtime for MacOSX  + >>> code that starts CouchDB from within Eclipse. >> >> Awesome! > > I spent few minut

Re: Run Local Button - Improving End User Experience

2011-06-10 Thread Benoit Chesneau
On Thu, Jun 9, 2011 at 1:43 AM, Randall Leeds wrote: > On Wed, Jun 8, 2011 at 15:57, Alexander Gabriel wrote: >> awesome. What a killer idea. I want it! >> >> Alex >> >> >> >> 2011/6/9 Ryan Ramage >> >>> I am in the mist of a idea, and wanted to run it past the community >>> before I took it too

Backup, Point In Time recovery

2011-06-10 Thread Thomas Hommers
Hello, I am fairly new to CouchDB, but reading a lot docs and howtos lately. I would like to implement a good backup solution for CouchDB that should be able to let me roll-back and -forward anytime. I read a lot suggestions to use replication as backup. As long the replicated database won't b

Re: how to sum values of a view in a date range?

2011-06-10 Thread Gabor Ratky
We built charts on top of our aggregate / reduced views using Highcharts [1] and using a _list that rendered the keys and values as a series of two-element arrays [['2011-03-01', 476.23], ['2011-03-02', 425.12], ...]. We drive the whole thing with Kanso [2] and pull the data down asynchronously