Re: Best way to model historical data

2011-11-07 Thread Robert Johnson
I wouldn't use multiple documents, but have a single document that has arrays of things that might change over time that you want to keep history for. In your example you would have a block representing categories looking something like {"categories": { "category_set": [

Re: Full text search - is it coming? If yes, approx when.

2011-03-28 Thread Robert Johnson
If you are looking to implement full text search then I would suggest trying ElasticSearch using the River plugin. It does full text and tons of other clever auto indexing stuff. It's very ready to install. Bob Johnson "Andrew Stuart (SuperCoders)" wrote: >It would be good to know if full tex

Re: Monitoring system based on CouchDB?

2011-03-14 Thread Robert Johnson
Nikolai You would have a rapidly growing database on your nodes as well because each document update on each node would generate a new version. I offer this:- Have a document in your master database with the URLs of the nodes and have a cron job to read that document and initiate a one time r

Re: How to make a Stock with CouchDB?

2011-02-24 Thread Robert Johnson
Makus What you need to be very careful of here is CouchDB lack of ACID transactions across multiple documents. The best thought of the top of my head would be one document per stock item and hold the usual "parts master type data" in the document and then have an array of stock movement elemen

Re: startkey and endkey problems

2011-02-23 Thread Robert Johnson
Fabio As you are trying to do a partial key search I think you need startkey="2176-9451" endkey="2176-9451\u" ("\u" is the biggest unicode character you can get) Bob On 23 Feb 2011, at 17:54, Fabio Batalha Cunha dos Santos wrote: > Hello All, > > I'm using startkey and endkey in ma

Re: Get All Versions of a document

2011-02-22 Thread Robert Johnson
Carlos There is a revision number (which is sequential) but you cannot rely on this in 2 cases, first if you are replicating then you may not get all the versions replicated (if a document is updated twice between replication cycles then the intermediate state will not be replicated) second if

Re: Atomic update of multiple attachments?

2011-02-08 Thread Robert Johnson
> > When reading, check that currency_token and eventual_currency_token are > equal. If not, the record is incomplete and should not be used. > > Your algorithm will be good when I finally hit the case where I have to do > better than just detecting a partial update. Thanks a

Re: Atomic update of multiple attachments?

2011-02-08 Thread Robert Johnson
porary document, load it up >> with attachments, and then rename it? >> >> Wayne >> >> On 02/07/11 16:38, Robert Johnson wrote: >>> >>> Create your document with attributes "eventual_attachment _count" (set >>> this to the expected co

Re: Atomic update of multiple attachments?

2011-02-07 Thread Robert Johnson
mething can be done that's similar to how we >create/rename files in Unix. Can I create a temporary document, load it >up with attachments, and then rename it? > >Wayne > >On 02/07/11 16:38, Robert Johnson wrote: >> >> Create your document with attributes "

Re: Atomic update of multiple attachments?

2011-02-07 Thread Robert Johnson
Create your document with attributes "eventual_attachment _count" (set this to the expected count) and "attachment_count_so_far" (set this to zero). As you add each attachment, increment "attachment_count_so_far" Create a view which only emits when "attachment_count_so_far" = "eventual_attachm

Re: Atomic update of multiple attachments?

2011-02-07 Thread Robert Johnson
Create your document with attributes "eventual_attachment _count" (set this to the expected count) and "attachment_count_so_far" (set this to zero). As you add each attachment, increment "attachment_count_so_far" Create a view which only emits when "attachment_count_so_far" = "eventual_attach

Re: new couch user: "denormalizing" using views? General application architecture suggestions?

2011-02-07 Thread Robert Johnson
Michael Couch is very different from a RDBMS. From what you have said, I think that you want to load your CouchDB "one document at a time" as users access them in a browser session. Before loading anything you first need to design your documents. To do this you need to define the data in your

Replication and security advice sought

2011-02-07 Thread Robert Johnson
Hello I am creating an application in which individual Company sites input data into individual CouchDB databases running on site specific servers which is then replicated to a single central system at head office (running on a separate server). The central system holds configuration data for e