erica icon indicating copy to clipboard operation
erica copied to clipboard

Inital work on uploading from _docs

Open ryanramage opened this issue 13 years ago • 10 comments

A good start on issue #17.

Current summary:

  • uses _docs as the default
  • uses couch_beam:save_doc, so if there is an _id, it is used, otherwise doc gets a generated _id. The filename is ignored. Should it be considered for anything?
  • currently flat hierarchy. no nested folders, etc.
  • prints to console success/total docs uploaded if there is a _docs dir and one or more docs.

Todo:

  • Add support for a folder matching a doc name, and having attachments in that folder.
  • Using the -f switch to force overwrite of docs that exist.
  • Check for doc before doing a save_doc so no conflict is generated.
  • better logging of error conditions.
  • specify an alternate docs dir.

ryanramage avatar Oct 15 '12 16:10 ryanramage

maybe it worth to add the multipart api to couchbeam so we could send in one pass all docs ?

benoitc avatar Oct 17 '12 17:10 benoitc

yes, adding multipart to couchbeam would be a nice feature. Would it be easy to do?

ryanramage avatar Oct 22 '12 00:10 ryanramage

yes and no. multipart is supported in hackney. To do this I have to replace the use of ibrowse by hackney in couchbeam then it will be OK.

benoitc avatar Oct 24 '12 07:10 benoitc

@benoitc: can this please be merged soon? I would like to add some docs to erica to push, but it's neglecting them telling me it's pushing 0 of x documents.

johnjelinek avatar Feb 05 '13 05:02 johnjelinek

@ryanramage what's the status of it?

benoitc avatar Feb 05 '13 06:02 benoitc

@benoitc Still the same as above. I think it is a good basic start, and could be merged. The other remaining items can be added as separate issues so as not to hold things up.

ryanramage avatar Feb 06 '13 16:02 ryanramage

Would this be somewhat equivalent to couchapp pushdocs? I am new to couchDB and couch apps, seems like I came in as the couch ecosystem was crashing (but hopefully, that's slowly getting resolved - but see the couchapp wiki for instance). Anyway, I disgress. I am able to push couch apps with couchapp.py but I'm stuck at pushdocs when it comes to erica.

millette avatar Mar 13 '13 14:03 millette

Has this been merged yet? Would love this feature

lancecarlson avatar Jun 06 '13 18:06 lancecarlson

So, couchapp.py is deprecated, but until erica support this (completely) erica is not actually a full replacement for it. Read, I keep using couchapp.py :grin:

Here's more info on the filesystem to design doc mapping: http://couchapp.org/page/filesystem-mapping

BigBlueHat avatar Oct 15 '13 18:10 BigBlueHat

I've been using couchapp for about a year now and never really had a reason to change. I tried out erica and at first everything was going fine but every time I erica pushed it gave me a 409 conflict error for a doc in my _docs folder. I had to go back to couchapp (which is totally fine). I might try to add the handling myself but I would have to learn erlang first :smile:

fetmar avatar Nov 07 '13 01:11 fetmar