Re: startkey

2013-07-16 Thread Paul Davis
No worries. Glad we got it working. On Tue, Jul 16, 2013 at 5:52 PM, Stephan Bardubitzki < step...@bardubitzki.com> wrote: > Hi Paul, > > unfortunately, I'm working only occasionally with CouchDB and hope this > will change when I have more time to work on my own projects. > > Your advise was re

Re: Is the CouchDB users database secure?

2013-07-16 Thread Robert Newson
Yes. On 17 July 2013 00:35, Oliver Schmidt wrote: > Am Mittwoch, 17. Juli 2013, 00:09:23 schrieb > Robert Newson: >> The _users database is not so open since > our 1.2.0 release. A user can >> only see their own document. > And how does logging in work? Is there a > server side component which ch

Re: Is the CouchDB users database secure?

2013-07-16 Thread Oliver Schmidt
Am Mittwoch, 17. Juli 2013, 00:09:23 schrieb Robert Newson: > The _users database is not so open since our 1.2.0 release. A user can > only see their own document. And how does logging in work? Is there a server side component which checks whether the incoming password equals the hash in the

Re: named reduce function

2013-07-16 Thread Robert Newson
:) On 17 July 2013 00:14, Stanley Iriele wrote: > That sounds painful Thanks... I was just curious is all. Man Robert > you're really on top of these user issues... Someone should send you a > trophy of kind Maybe just a big red couch! > > On Jul 16, 2013 4:08 PM, "Robert Newson" wrote:

Re: named reduce function

2013-07-16 Thread Stanley Iriele
That sounds painful Thanks... I was just curious is all. Man Robert you're really on top of these user issues... Someone should send you a trophy of kind Maybe just a big red couch! On Jul 16, 2013 4:08 PM, "Robert Newson" wrote: > > Because reduce values are calculated at view build time

Re: Is the CouchDB users database secure?

2013-07-16 Thread Robert Newson
The _users database is not so open since our 1.2.0 release. A user can only see their own document. Even before this you could only see password hashes, but we agreed even this was too much to show. B. On 17 July 2013 00:08, Oliver Schmidt wrote: > While reading the Kan.so docs ( > http://kan.s

Re: named reduce function

2013-07-16 Thread Robert Newson
Because reduce values are calculated at view build time, not query time, so you're basically asking the view to precompute every possible function's output. B. On 17 July 2013 00:01, Stanley Iriele wrote: > just curious, > > How feasable is it for there to be named reduce functions > and instea

Is the CouchDB users database secure?

2013-07-16 Thread Oliver Schmidt
While reading the Kan.so docs ( http://kan.so/docs/The_users_database ) I saw that the users database, which includes username and password, is publicly accessible for everyone. Couldn't an attacker use this to create a list of all username-password pairs? Wouldn't it be more secure to use a

Re: Trying to wrap my head around CouchDB

2013-07-16 Thread Yves S. Garret
On Tue, Jul 16, 2013 at 6:42 PM, Lance Carlson wrote: > I've also found when I've needed to create large filtering engines > with searching that Couchdb views fall short. I would recommend using > cloudant's search API or elastic search for this use case so you don't > start thinking Couchdb suck

named reduce function

2013-07-16 Thread Stanley Iriele
just curious, How feasable is it for there to be named reduce functions and instead of reduce=true/false it could be reduce= and keep everything like group levels the same. and the default for no reduce being specified it could default to nothing ..like false. the only Illegal name for a reduce fu

Re: Trying to wrap my head around CouchDB

2013-07-16 Thread Lance Carlson
When establishing relationships between documents, it's perfectly reasonable to specify a relationship_id key inside of the document and storing the _id of another document in there. Keep in mind that it usually takes 2 queries to get the information you want. You can also use view collation to sti

Re: startkey

2013-07-16 Thread Stephan Bardubitzki
Hi Paul, unfortunately, I'm working only occasionally with CouchDB and hope this will change when I have more time to work on my own projects. Your advise was really helpful and appreciated. What I came up with is a map function like this: function(doc) { if (doc.kml_id && doc.marker &

Re: Trying to wrap my head around CouchDB

2013-07-16 Thread Lance Carlson
I've also found when I've needed to create large filtering engines with searching that Couchdb views fall short. I would recommend using cloudant's search API or elastic search for this use case so you don't start thinking Couchdb sucks :) Sent from my iPhone On Jul 16, 2013, at 6:35 PM, "Yves S

Re: Trying to wrap my head around CouchDB

2013-07-16 Thread Yves S. Garret
On Tue, Jul 16, 2013 at 6:35 PM, Yves S. Garret wrote: > On Tue, Jul 16, 2013 at 6:06 PM, Oliver Schmidt > wrote: > >> >> > Ok. Say in MySQL I have an orders table, a customers table and an >> items >> > table (where the stuff that I want to sell is located). How would this >> > look like >> >

Re: Trying to wrap my head around CouchDB

2013-07-16 Thread Yves S. Garret
On Tue, Jul 16, 2013 at 6:06 PM, Oliver Schmidt wrote: > > > Ok. Say in MySQL I have an orders table, a customers table and an > items > > table (where the stuff that I want to sell is located). How would this > > look like > > in CouchDB? > You put each customer, order and item into its own doc

Re: Trying to wrap my head around CouchDB

2013-07-16 Thread Oliver Schmidt
> Ok. Say in MySQL I have an orders table, a customers table and an items > table (where the stuff that I want to sell is located). How would this > look like > in CouchDB? You put each customer, order and item into its own document. > So you would have each customer, order and items document

Re: Can't upload a pic to CouchDB.

2013-07-16 Thread Robert Newson
Hm, ok. Noted. thanks. On 16 July 2013 21:35, Yves S. Garret wrote: > On Tue, Jul 16, 2013 at 4:32 PM, Robert Newson wrote: > >> You really think that "Content-Type must be application/json" isn't >> telling you what you need to do (namely, set the content-type to >> application/json)? :) >> >>

Re: Can't upload a pic to CouchDB.

2013-07-16 Thread Yves S. Garret
On Tue, Jul 16, 2013 at 4:32 PM, Robert Newson wrote: > You really think that "Content-Type must be application/json" isn't > telling you what you need to do (namely, set the content-type to > application/json)? :) > > B. > > > On 16 July 2013 21:25, Yves S. Garret wrote: > > On Tue, Jul 16, 201

Re: Can't upload a pic to CouchDB.

2013-07-16 Thread Robert Newson
You really think that "Content-Type must be application/json" isn't telling you what you need to do (namely, set the content-type to application/json)? :) B. On 16 July 2013 21:25, Yves S. Garret wrote: > On Tue, Jul 16, 2013 at 4:20 PM, Robert Newson wrote: > >> You can upload a document and

Re: Can't upload a pic to CouchDB.

2013-07-16 Thread Yves S. Garret
On Tue, Jul 16, 2013 at 4:20 PM, Robert Newson wrote: > You can upload a document and all its attachments in one PUT request > if you use multipart/related, yes. Check the test suite for a working > example. > > B. > > > On 16 July 2013 21:19, Robert Newson wrote: > > I think the error message i

Re: Can't upload a pic to CouchDB.

2013-07-16 Thread Yves S. Garret
On Tue, Jul 16, 2013 at 4:19 PM, Robert Newson wrote: > I think the error message is very descriptive and tells you exactly what > to do. > > B. > > > On 16 July 2013 20:38, Yves S. Garret wrote: > > On Tue, Jul 16, 2013 at 3:22 PM, Yves S. Garret > > wrote: > > > >> On Tue, Jul 16, 2013 at 1:34

Re: Trying to wrap my head around CouchDB

2013-07-16 Thread Tim Black
Yves, On 07/16/2013 03:13 PM, Yves S. Garret wrote: > On Tue, Jul 16, 2013 at 4:11 PM, Tim Black wrote: > >> To get all order documents in one request, write, then query, a view >> which only emits documents if (doc.type == 'order'). As you learn about the way views and queries interact, you'll s

Re: Can't upload a pic to CouchDB.

2013-07-16 Thread Robert Newson
You can upload a document and all its attachments in one PUT request if you use multipart/related, yes. Check the test suite for a working example. B. On 16 July 2013 21:19, Robert Newson wrote: > I think the error message is very descriptive and tells you exactly what to > do. > > B. > > > On

Re: Can't upload a pic to CouchDB.

2013-07-16 Thread Robert Newson
I think the error message is very descriptive and tells you exactly what to do. B. On 16 July 2013 20:38, Yves S. Garret wrote: > On Tue, Jul 16, 2013 at 3:22 PM, Yves S. Garret > wrote: > >> On Tue, Jul 16, 2013 at 1:34 PM, Yves S. Garret < >> yoursurrogate...@gmail.com> wrote: >> >>> On Tue,

Re: Trying to wrap my head around CouchDB

2013-07-16 Thread Yves S. Garret
On Tue, Jul 16, 2013 at 4:11 PM, Tim Black wrote: > Yves, > > These pages will help you with these questions: > > http://guide.couchdb.org/editions/1/en/views.html > http://guide.couchdb.org/editions/1/en/lists.html > http://guide.couchdb.org/editions/1/en/cookbook.html > > More specifically, > >

Re: Trying to wrap my head around CouchDB

2013-07-16 Thread Tim Black
Yves, These pages will help you with these questions: http://guide.couchdb.org/editions/1/en/views.html http://guide.couchdb.org/editions/1/en/lists.html http://guide.couchdb.org/editions/1/en/cookbook.html More specifically, On 07/16/2013 02:51 PM, Yves S. Garret wrote: > 1 - How is data repre

Re: Trying to wrap my head around CouchDB

2013-07-16 Thread Yves S. Garret
On Tue, Jul 16, 2013 at 4:05 PM, Alexander Gabriel wrote: > 1: see here: http://guide.couchdb.org/editions/1/en/documents.html > Alex > > > > 2013/7/16 Yves S. Garret > > > Hi, > > > > I've recently picked up this book: > > http://guide.couchdb.org/editions/1/en/index.html > > > > I've read Part

Re: Trying to wrap my head around CouchDB

2013-07-16 Thread Yves S. Garret
On Tue, Jul 16, 2013 at 4:03 PM, Alexander Shorin wrote: > Hi, > > > 1 - How is data represented in CouchDB as compared to MySQL? How can I > create (or visualize in my head) multiple tuples of the same type of data > (as in a table that has columns of specific types and then each entry is a > r

Re: Trying to wrap my head around CouchDB

2013-07-16 Thread Alexander Gabriel
1: see here: http://guide.couchdb.org/editions/1/en/documents.html Alex 2013/7/16 Yves S. Garret > Hi, > > I've recently picked up this book: > http://guide.couchdb.org/editions/1/en/index.html > > I've read Part I and so far so good. However, as I'm going through the > book, I'm having some

Re: Trying to wrap my head around CouchDB

2013-07-16 Thread Alexander Shorin
Hi, > 1 - How is data represented in CouchDB as compared to MySQL? How can I > create (or visualize in my head) multiple tuples of the same type of data (as > in a table that has columns of specific types and then each entry is a row)? Nohow. These are two very different databases with differe

Trying to wrap my head around CouchDB

2013-07-16 Thread Yves S. Garret
Hi, I've recently picked up this book: http://guide.couchdb.org/editions/1/en/index.html I've read Part I and so far so good. However, as I'm going through the book, I'm having some nagging concerns. Here are the questions that I have: 1 - How is data represented in CouchDB as compared to MySQL

Re: startkey

2013-07-16 Thread Paul Davis
In that case I'd just emit the part of the doc for the language for each row. On Tue, Jul 16, 2013 at 1:00 PM, Stephan Bardubitzki < step...@bardubitzki.com> wrote: > Got it, however, it is not quite what I was hoping to accomplish. > > The language object of the each doc has 12 languages and in

Re: startkey

2013-07-16 Thread Paul Davis
As the value (the second argument to emit). On Tue, Jul 16, 2013 at 2:45 PM, Paul Davis wrote: > In that case I'd just emit the part of the doc for the language for each > row. > > > On Tue, Jul 16, 2013 at 1:00 PM, Stephan Bardubitzki < > step...@bardubitzki.com> wrote: > >> Got it, however, it

Re: Can't upload a pic to CouchDB.

2013-07-16 Thread Yves S. Garret
On Tue, Jul 16, 2013 at 3:22 PM, Yves S. Garret wrote: > On Tue, Jul 16, 2013 at 1:34 PM, Yves S. Garret < > yoursurrogate...@gmail.com> wrote: > >> On Tue, Jul 16, 2013 at 1:12 PM, Robert Newson wrote: >> >>> You need to pass the current rev, which clearly doesn't match the one >>> you tried and

Re: Can't upload a pic to CouchDB.

2013-07-16 Thread Yves S. Garret
On Tue, Jul 16, 2013 at 1:34 PM, Yves S. Garret wrote: > On Tue, Jul 16, 2013 at 1:12 PM, Robert Newson wrote: > >> You need to pass the current rev, which clearly doesn't match the one >> you tried and got the 409 conflict telling you it was wrong for. >> >> On 16 July 2013 18:07, Yves S. Garret

Apache CouchDB Party and Discounted OSCON ticket

2013-07-16 Thread Christine Hevey
Hi Cloudant is going to be in Portland, OR at OSCON July 22-26 and we'd like to see you. OSCON is the best place to prepare for what comes next in open source technologies. Join over 3,000 developers, innovators, business leaders, and investors to learn new skills and unde

Update (Erlang) Android-Couchbase Viable?

2013-07-16 Thread Brad Rhoads
Currently, the future of CouchDB on mobile appears to be Coubhase Lite. As I've been looking into changing our app, I'm seeing some challenges using Couchbase Lite. We have a regular Android app that wraps a couchapp, using the now depreciated android-couchbase. My question is if it makes sense to

Re: startkey

2013-07-16 Thread Stephan Bardubitzki
Got it, however, it is not quite what I was hoping to accomplish. The language object of the each doc has 12 languages and include_docs=true will response all of them. What can I do to get all doc properties but just the language 'fr' property, for example, to save on data usage on mobile devi

Re: Can't upload a pic to CouchDB.

2013-07-16 Thread Yves S. Garret
On Tue, Jul 16, 2013 at 1:12 PM, Robert Newson wrote: > You need to pass the current rev, which clearly doesn't match the one > you tried and got the 409 conflict telling you it was wrong for. > > On 16 July 2013 18:07, Yves S. Garret wrote: > > On Tue, Jul 16, 2013 at 11:39 AM, Yves S. Garret >

Re: Access from remote IP

2013-07-16 Thread Dan Santner
Also double check you don't have some sort of firewall between your host and the internet. May have to do some port forwarding. On Jul 16, 2013, at 12:26 PM, Robert Newson wrote: > Did you restart couchdb after editing the local.ini file? > > On 16 July 2013 18:25, Samuele Coppede wrote: >> h

Re: Access from remote IP

2013-07-16 Thread Robert Newson
Did you restart couchdb after editing the local.ini file? On 16 July 2013 18:25, Samuele Coppede wrote: > hi all, im Samuele from italy, > I'm new to couchDB, > i installed couchDB into my server (dedicated one) > i can connect perfectly from localhost > but I'm unable to connect remotely > > i h

Access from remote IP

2013-07-16 Thread Samuele Coppede
hi all, im Samuele from italy, I'm new to couchDB, i installed couchDB into my server (dedicated one) i can connect perfectly from localhost but I'm unable to connect remotely i have changed the bind address to 0.0.0.0 and also opened the port in iptables but when i try to curl from remote machine

Re: Can't upload a pic to CouchDB.

2013-07-16 Thread Robert Newson
You need to pass the current rev, which clearly doesn't match the one you tried and got the 409 conflict telling you it was wrong for. On 16 July 2013 18:07, Yves S. Garret wrote: > On Tue, Jul 16, 2013 at 11:39 AM, Yves S. Garret > wrote: >> >> On Tue, Jul 16, 2013 at 11:13 AM, Tim Tisdall wro

Re: Can't upload a pic to CouchDB.

2013-07-16 Thread Yves S. Garret
On Tue, Jul 16, 2013 at 11:39 AM, Yves S. Garret wrote: > On Tue, Jul 16, 2013 at 11:13 AM, Tim Tisdall wrote: > >> Do you have a space before "--data-binary" when you run the command? >> >> >> On Tue, Jul 16, 2013 at 11:05 AM, Yves S. Garret < >> yoursurrogate...@gmail.com >> > wrote: >> >> > I

Re: Can't upload a pic to CouchDB.

2013-07-16 Thread Yves S. Garret
On Tue, Jul 16, 2013 at 11:09 AM, Robert Newson wrote: > Yes, you are ignoring your shell's helpful message :) > > try putting quotes around your url. > > B. > > > On 16 July 2013 16:05, Yves S. Garret wrote: > > I'm going through this book and I'm in this section: > > http://guide.couchdb.org/e

Re: Can't upload a pic to CouchDB.

2013-07-16 Thread Yves S. Garret
On Tue, Jul 16, 2013 at 11:13 AM, Tim Tisdall wrote: > Do you have a space before "--data-binary" when you run the command? > > > On Tue, Jul 16, 2013 at 11:05 AM, Yves S. Garret < > yoursurrogate...@gmail.com > > wrote: > > > I'm going through this book and I'm in this section: > > http://guide.

Re: Can't upload a pic to CouchDB.

2013-07-16 Thread Tim Tisdall
Do you have a space before "--data-binary" when you run the command? On Tue, Jul 16, 2013 at 11:05 AM, Yves S. Garret wrote: > I'm going through this book and I'm in this section: > http://guide.couchdb.org/editions/1/en/api.html#attachments > > I try this in the command line and this is the er

Can't upload a pic to CouchDB.

2013-07-16 Thread Yves S. Garret
I'm going through this book and I'm in this section: http://guide.couchdb.org/editions/1/en/api.html#attachments I try this in the command line and this is the error that I get: % curl -vX PUT http://127.0.0.1:5984/albums/6e1295ed6c29495e54cc05947f18c8af/artwork.jpg?rev=2-2739352689--data-binary @

Re: Can't upload a pic to CouchDB.

2013-07-16 Thread Robert Newson
Yes, you are ignoring your shell's helpful message :) try putting quotes around your url. B. On 16 July 2013 16:05, Yves S. Garret wrote: > I'm going through this book and I'm in this section: > http://guide.couchdb.org/editions/1/en/api.html#attachments > > I try this in the command line and

Re: Can't upload a pic to CouchDB.

2013-07-16 Thread Andrew Melo
On Tue, Jul 16, 2013 at 10:05 AM, Yves S. Garret wrote: > I'm going through this book and I'm in this section: > http://guide.couchdb.org/editions/1/en/api.html#attachments > > I try this in the command line and this is the error that I get: > % curl -vX PUT > > http://127.0.0.1:5984/albums/6e129