You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Johannes Schneider <ma...@cedarsoft.com> on 2011/05/23 18:08:12 UTC

URL for _all_docs

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi guys,


I know that I can fetch all docs using an URL like this:


http://server/mydb/_all_docs

But is it also possible to use the path as for user defined views?

http://server/mydb/_design/mycat/_view/myview

I am looking for something like that:

http://server/mydb/_design/build_in/_view/all_docs



Thanks,

Johannes


- -- 
Johannes Schneider - blog.cedarsoft.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iQEcBAEBAgAGBQJN2oZpAAoJEAytD9R7Qv6d1eUIALA9gpcGqZfNn6moIUJle7+5
58kX7ux5Vi2MSETRZfI6qPL2rHIIbXLO58yZdJihzvesO8u5lK+k00oC7/FLDkoc
9gWqAa9llF8evj+fdzslb3r8oPxBXTx53EdttEnd9Cp4eiO9UgyCAuXBn3S9Ihiv
8VTFwS+o18TICcleQq1ulEz5uAyTciKPCocQ/EfHgnaPokkqgXTvXi2+YJYHkazl
2VEf/Sm3xGjGFRpnpMxoB+zBB3qVZjePABSNdJrfsls8/v0DstZaURBJ9mZGB9GE
pVhPqP0MVUWbzc05N+qpykhi1kRItAkD5lziYd2BG8MoSZt6gUF9FH1TQ/fpIdM=
=9rbE
-----END PGP SIGNATURE-----

Re: URL for _all_docs

Posted by Marcos Ortiz <ml...@uci.cu>.
On 05/23/2011 02:56 PM, Johannes Schneider wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
>> Anyway, I see 2 simple solutions:
>>
>> 1. write a view that emit all docs
> Yes - I followed that solution. My idea is: This view is really, really
> large. So it needs quite some time to generate. Therefore I'd preferd to
> use the existing view that still exists..
Well, you can write you custom views using Map/Reduce functions and 
stores the results on its discs for high performance.
On the "CouchDB: The Definitive Guide"´s Book, on Chapter 6 "Finding 
Your Data with Views", there are good examples of the
views´s development.

Regards

-- 
Marcos Luís Ortíz Valmaseda
  Software Engineer (Large-Scaled Distributed Systems)
  University of Information Sciences,
  La Habana, Cuba
  Linux User # 418229
  http://about.me/marcosortiz


Re: URL for _all_docs

Posted by Johannes Schneider <ma...@cedarsoft.com>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

> Anyway, I see 2 simple solutions:
> 
> 1. write a view that emit all docs

Yes - I followed that solution. My idea is: This view is really, really
large. So it needs quite some time to generate. Therefore I'd preferd to
use the existing view that still exists..



Thanks,

Johannes

> 2. Put all behind _rewrite/ and make a rule using _all_docs.
> 
> - benoît

- -- 
Johannes Schneider - blog.cedarsoft.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iQEcBAEBAgAGBQJN2rT9AAoJEAytD9R7Qv6dGRQH/jWOP1z1TcfRXWKDQjziNtqt
CAz4tYuHgBcsJP8OGrEoUeNryFRmG2GJGbXxYHc60xWs7EcrRQu9Di2TCzi3vSWb
u+rOy2bvB9C2Ix41v7psEsPkzqHXIUQvDN4Vpdiwh5FN0IME3Nbf7lTHylG/pTjm
tCt7CL8JYLkqF3yvykam2ye21hm9SXEw70pSEV4YrxmQDtFj9vX0Twmj4cnBcVU8
+25EvZ181HgpVNkZNDe6bZNpbpH7ZXy9YxKl0Eo1HoIV6fdp0Ilzi7P6FgVIcKE3
GVuY1LyzO+cDSItpCCV0NQ6B07z38gcXDL6Q1jYlUJZ4W+WaSL+OVt0sXdFkr+I=
=a6w4
-----END PGP SIGNATURE-----

Re: URL for _all_docs

Posted by Benoit Chesneau <bc...@gmail.com>.
On Mon, May 23, 2011 at 6:08 PM, Johannes Schneider
<ma...@cedarsoft.com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi guys,
>
>
> I know that I can fetch all docs using an URL like this:
>
>
> http://server/mydb/_all_docs
>
> But is it also possible to use the path as for user defined views?
>
> http://server/mydb/_design/mycat/_view/myview
>
> I am looking for something like that:
>
> http://server/mydb/_design/build_in/_view/all_docs
>
>
>
> Thanks,
>
> Johannes
>
>
Why ?

Anyway, I see 2 simple solutions:

1. write a view that emit all docs
2. Put all behind _rewrite/ and make a rule using _all_docs.

- benoît