couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Davis" <paul.joseph.da...@gmail.com>
Subject Re: help regarding couchdb python view server
Date Wed, 17 Dec 2008 18:15:05 GMT
On Wed, Dec 17, 2008 at 3:32 AM, paul jobs <webjogger@gmail.com> wrote:
>  Hey
>
> So far I m loving using couchdb as a dictionary store and it is helping me a
> lot so far.. But i m unable to write queries in javascript
>
> how do you use a view that has been prepared in couchdb python and how to
> pass query arguments in views? it is quite confusing
>

There are no real 'query' arguments. Only slice operators to return
the slice of results you wan't. These being things like startkey,
endkey, count, etc.

>
>
> how do we write couchdb map reduce queries in python
> i have searched extensively but am unable to find a good doc
>

There's a description of view servers here:
http://wiki.apache.org/couchdb/View_server

Basically, the steps are:

1. Add a query_servers section to your local.ini and specify a
python=/path/to/python-view-server
2. Edit your _design doc to include a "language": "python" member.
3. Write your map/reduce functions according to what the python view
server expects.

There's a python view server included in couchdb-python that you can
use as well.

> Please point me to solutions
>
> Any help is appreciated
>

HTH,
Paul Davis

Mime
View raw message