couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ayhan Kesenci <a.kesenc...@googlemail.com>
Subject Re: Is it
Date Thu, 22 Jan 2015 13:05:00 GMT
But for example i have in this view a

http://127.0.0.1:5984/twitterdb/twitterdb/_design/tweetzahl/_view/tweetzahl?reduce=false
<http://127.0.0.1:5984/twitterdb/twitterdb/_design/user/_view/user?reduce=false&include_docs=true>

the reduce function, but if set reduce = true, it dont works, i mean how i
get this whole view with the map and reduce function in a export ?

BUT BIG THANKS UNTIL NOW !!! STANLEY AND YA ALL

2015-01-22 14:01 GMT+01:00 Ayhan Kesenci <a.kesenci89@googlemail.com>:

> It dont work with include_docs = true at the end BUT IT WORKS SOOO
>
>
>
> http://127.0.0.1:5984/twitterdb/twitterdb/_design/user/_view/user?reduce=false
> <http://127.0.0.1:5984/twitterdb/twitterdb/_design/user/_view/user?reduce=false&include_docs=true>
> >
>
> THIS WORKS YEAH BUDDY !!!!=D
>
> 2015-01-22 4:11 GMT+01:00 Stanley Iriele <siriele2x3@gmail.com>:
>
>> Also I took a look at your doc...and in your doc you're doing
>>
>> emit(doc.user, doc)....
>>
>> Going down this route usually leads you to pain. Try adding a "type" param
>> to your document that lets you know what type of document it is. Next if
>> you probably don't want to emit the entire doc in the view. If you need
>> the
>> entire doc an view time try using include_docs=true as a query param. This
>> keeps your views small, and they will be much faster to update, as you're
>> not copying the doc over and over again.
>>
>> This make your map function look something like this.
>>
>> map(doc){
>> if (doc.type==="user")
>>   emit(doc.user, null)
>> }
>>
>> and when you query it it should look like this:
>>
>> curl -X GET -g "
>>
>> http://127.0.0.1:5984/twitterdb/twitterdb/_design/user/_view/user?reduce=false&include_docs=true
>> "
>>  > C:\Users\Sei_Erfolgreich\Desktop\text.txt
>>
>> I hope this helps
>>
>> On Wed, Jan 21, 2015 at 7:05 PM, Stanley Iriele <siriele2x3@gmail.com>
>> wrote:
>>
>> > curl -X GET -g "
>> >
>> http://127.0.0.1:5984/twitterdb/twitterdb/_design/user/_view/user?reduce=false
>> "
>> >  > C:\Users\Sei_Erfolgreich\Desktop\text.txt
>> >
>> > On Wed, Jan 21, 2015 at 7:03 PM, Ayhan Kesenci <
>> a.kesenci89@googlemail.com
>> > > wrote:
>> >
>> >> like this ?
>> >> curl -X GET
>> >> http://127.0.0.1:5984/twitterdb/twitterdb/_design/user/_view/user
>> reduce
>> >> =
>> >> false> C:\Users\Sei_Erfolgreich\Desktop\text.txt
>> >>
>> >>
>> >> 2015-01-22 3:01 GMT+01:00 Stanley Iriele <siriele2x3@gmail.com>:
>> >>
>> >> > Huh?...no pass reduce=false as a url query string param...
>> >> > So....?reduce=false at the end of the query string
>> >> > On Jan 21, 2015 5:49 PM, "Ayhan Kesenci" <a.kesenci89@googlemail.com
>> >
>> >> > wrote:
>> >> >
>> >> > > now the error message is another one ,after ein put the
>> >> > >  function(doc){
>> >> > >
>> >> > > reduce = false;
>> >> > > }
>> >> > >
>> >> > > in it, now is this message in the csv file
>> >> > > {"error":"method_not_allowed","reason":"Only GET,POST,HEAD
>> allowed"}
>> >> > >
>> >> > >
>> >> > >
>> >> > > 2015-01-22 1:52 GMT+01:00 Stanley Iriele <siriele2x3@gmail.com>:
>> >> > >
>> >> > > > I still can't see our output but we can proceed anyway :-D.
You
>> >> have a
>> >> > > > reduce function in that map section and couchdb's default
for
>> >> reducing
>> >> > is
>> >> > > > true. Just add reduce=false as a query param and it will
spit out
>> >> the
>> >> > not
>> >> > > > reduced view
>> >> > > >
>> >> > > > On Wed, Jan 21, 2015 at 4:43 PM, Ayhan Kesenci <
>> >> > > a.kesenci89@googlemail.com
>> >> > > > >
>> >> > > > wrote:
>> >> > > >
>> >> > > > > the only thing that it is in the csv is
>> >> > > > >
>> >> > > > >  {"rows":[   {"key":null,"value":1915}  ]}
>> >> > > > >
>> >> > > > > 2015-01-22 1:22 GMT+01:00 Stanley Iriele <siriele2x3@gmail.com
>> >:
>> >> > > > >
>> >> > > > > > Also it looks like your curl -X GET <url>
has the GET and the
>> >> <url>
>> >> > > > > > touching so it looks like GET<url> to me
>> >> > > > > >
>> >> > > > > > On Wed, Jan 21, 2015 at 4:21 PM, Stanley Iriele
<
>> >> > > siriele2x3@gmail.com>
>> >> > > > > > wrote:
>> >> > > > > >
>> >> > > > > > > Hey I can't actually see images on there
>> >> > > > > > >
>> >> > > > > > > On Wed, Jan 21, 2015 at 3:59 PM, Ayhan Kesenci
<
>> >> > > > > > a.kesenci89@googlemail.com
>> >> > > > > > > > wrote:
>> >> > > > > > >
>> >> > > > > > >> [image: Inline-Bild 1]
>> >> > > > > > >>
>> >> > > > > > >> [image: Inline-Bild 2]
>> >> > > > > > >>
>> >> > > > > > >> there are the map function and the command
>> >> > > > > > >>
>> >> > > > > > >> 2015-01-21 22:55 GMT+01:00 Stanley Iriele
<
>> >> siriele2x3@gmail.com
>> >> > >:
>> >> > > > > > >>
>> >> > > > > > >>> hmm?
>> >> > > > > > >>>
>> >> > > > > > >>> your curl command should have worked
just
>> fine...something
>> >> > tells
>> >> > > me
>> >> > > > > > >>> you're
>> >> > > > > > >>> not typing EXACTLY what you sent...could
you type history
>> >> and
>> >> > > paste
>> >> > > > > it
>> >> > > > > > >>> here?
>> >> > > > > > >>>
>> >> > > > > > >>> Also...could you show us the map and
reduce functions as
>> >> well?
>> >> > > > > > >>>
>> >> > > > > > >>> On Wed, Jan 21, 2015 at 1:46 PM, Ayhan
Kesenci <
>> >> > > > > > >>> a.kesenci89@googlemail.com>
>> >> > > > > > >>> wrote:
>> >> > > > > > >>>
>> >> > > > > > >>> > So any idea please?
>> >> > > > > > >>> > Hi,
>> >> > > > > > >>> >
>> >> > > > > > >>> > I just re-checked here and in
principle, your approach
>> is
>> >> > > > correct.
>> >> > > > > > I'd
>> >> > > > > > >>> try
>> >> > > > > > >>> > a.) inserting the URL in a browser
(ideally not MSIE)
>> and
>> >> b:
>> >> > > > typing
>> >> > > > > > >>> this
>> >> > > > > > >>> > thing verbatim once more into
cmd. Then I'm out of
>> ideas -
>> >> > but
>> >> > > > > you're
>> >> > > > > > >>> > almost there for sure.
>> >> > > > > > >>> >
>> >> > > > > > >>> > Good luck
>> >> > > > > > >>> >     Sebastian
>> >> > > > > > >>> >
>> >> > > > > > >>> >
>> >> > > > > > >>> > On Wed, Jan 21, 2015 at 9:33
PM, Ayhan Kesenci <
>> >> > > > > > >>> a.kesenci89@googlemail.com
>> >> > > > > > >>> > >
>> >> > > > > > >>> > wrote:
>> >> > > > > > >>> >
>> >> > > > > > >>> > > I try "curl -X GET
>> >> > > > > > >>> > >
>> >> > > > >
>> http://127.0.0.1:5984/twitterdb/_design/tweetzahl/_view/tweetzahl
>> >> >
>> >> > > > > > >>> > > C:\Users\Sei_Erfolgreich\Desktop\sebastian.txt
>> >> > > > > > >>> > >
>> >> > > > > > >>> > > end get a error message
in the txt file
>> >> > > > > > >>> > > {"error":"method_not_allowed","reason":"Only
>> >> GET,POST,HEAD
>> >> > > > > > allowed"}
>> >> > > > > > >>> > >
>> >> > > > > > >>> > >
>> >> > > > > > >>> > > 2015-01-21 21:25 GMT+01:00
Sebastian Rothbucher <
>> >> > > > > > >>> > > sebastianrothbucher@googlemail.com>:
>> >> > > > > > >>> > >
>> >> > > > > > >>> > > > Hi,
>> >> > > > > > >>> > > > try
>> >> > > > > > >>>
>> >> > > http://127.0.0.1:5984/twitterdb/_design/tweetzahl/_view/tweetzahl
>> >> > > > > > >>> > > > Good luck!
>> >> > > > > > >>> > > >    Sebastian
>> >> > > > > > >>> > > >
>> >> > > > > > >>> > > > On Wed, Jan 21, 2015
at 9:22 PM, Ayhan Kesenci <
>> >> > > > > > >>> > > a.kesenci89@googlemail.com
>> >> > > > > > >>> > > > >
>> >> > > > > > >>> > > > wrote:
>> >> > > > > > >>> > > >
>> >> > > > > > >>> > > > > I mean for example
you have this command to
>> export a
>> >> > > > couchdb
>> >> > > > > > with
>> >> > > > > > >>> > curl
>> >> > > > > > >>> > > > >
>> >> > > > > > >>> > > > >
>> >> > > > http://127.0.0.1:5984/twitterdb/_all_docs?include_docs=true>
>> >> > > > > > >>> > > > > C:\Users\Sei_Erfolgreich\Desktop\text.txt
>> >> > > > > > >>> > > > >
>> >> > > > > > >>> > > > > but i need a special
view, but if I try it to
>> copy
>> >> the
>> >> > > url
>> >> > > > > > fromt
>> >> > > > > > >>> the
>> >> > > > > > >>> > > view
>> >> > > > > > >>> > > > > in the command
>> >> > > > > > >>> > > > >
>> >> > > > > > >>> > > > >
>> >> > > > > > >>> > > > >
>> >> > > > > > >>> > > > >
>> >> > > > > > >>> > > >
>> >> > > > > > >>> > >
>> >> > > > > > >>> >
>> >> > > > > > >>> >
>> >> > > > > > >>>
>> >> > > > > >
>> >> > > > >
>> >> > > >
>> >> > >
>> >> >
>> >>
>> http://127.0.0.1:5984/_utils/database.html?twitterdb/_design/tweetzahl/_view/tweetzahl
>> >> > > > > > >>> > > > > > C:\Users\Sei_Erfolgreich\Desktop\text.txt
>> >> > > > > > >>> > > > >
>> >> > > > > > >>> > > > >
>> >> > > > > > >>> > > > > dont work,only
it saves the html version, but i
>> need
>> >> > the
>> >> > > > data
>> >> > > > > > >>> > > > >
>> >> > > > > > >>> > > > > 2015-01-21 20:33
GMT+01:00 Alexander Gabriel <
>> >> > > > > alex@barbalex.ch
>> >> > > > > > >:
>> >> > > > > > >>> > > > >
>> >> > > > > > >>> > > > > > you can use
a list if you want to generate a
>> >> format
>> >> > > other
>> >> > > > > > than
>> >> > > > > > >>> json
>> >> > > > > > >>> > > > > > Alex
>> >> > > > > > >>> > > > > >
>> >> > > > > > >>> > > > > >
>> >> > > > > > >>> > > > > > 2015-01-21
20:29 GMT+01:00 Aurélien Bénel <
>> >> > > > > > >>> aurelien.benel@utt.fr>:
>> >> > > > > > >>> > > > > >
>> >> > > > > > >>> > > > > > > >
Is it possible to export a couchdb view ?
>> >> > > > > > >>> > > > > > >
>> >> > > > > > >>> > > > > > > Err...
A view is already a JSON payload got
>> with
>> >> > > > HTTP...
>> >> > > > > > >>> > > > > > > What
do you mean?
>> >> > > > > > >>> > > > > > > What
for? In which format?
>> >> > > > > > >>> > > > > > >
>> >> > > > > > >>> > > > > > >
>> >> > > > > > >>> > > > > > > Regards,
>> >> > > > > > >>> > > > > > >
>> >> > > > > > >>> > > > > > > Aurélien
>> >> > > > > > >>> > > > > >
>> >> > > > > > >>> > > > >
>> >> > > > > > >>> > > >
>> >> > > > > > >>> > >
>> >> > > > > > >>> >
>> >> > > > > > >>>
>> >> > > > > > >>
>> >> > > > > > >>
>> >> > > > > > >
>> >> > > > > >
>> >> > > > >
>> >> > > >
>> >> > >
>> >> >
>> >>
>> >
>> >
>>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message