incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Keane <keane.r...@gmail.com>
Subject Re: Rewrite with startkey, endkey and \u9999
Date Mon, 10 Sep 2012 14:11:36 GMT
How about,  _view/foo?startkey=["en","curious oil"]&endkey=["en","curious
oil"* +"\u9999"*]

On Mon, Sep 10, 2012 at 9:55 AM, Aurélien Bénel <aurelien.benel@utt.fr>wrote:

> Hi everyone, hi Benoît,
>
> As the output of a view, we have:
>   ...
>   ["en", "cry,"]                                                ...
>   ["en", "curious oil within;"]                 ...
>   ["en", "curse the ground any mor"]    ...
>   ...
>
> Note:  I use here a simplified syntax. The first column is for keys.
>
> To use this view as an exact phrase "search engine", we build requests
> like:
>   _view/foo?startkey=["en","curious oil"]&endkey=["en","curious oil\u9999"]
>
> Now, we would like to rewrite this request from:
>   search?language=en&query=curious oil
>
> This seems that we would need something similar to:
> {
>   "from": "search",
>   "to": "_view/foo",
>   "query": {
>     "startkey": [":language",":query"],
>     "endkey": [":language",":query\u9999"]
>   }
> }
>
> Is there any way to tell CouchDB that \u9999 is not a part of the variable
> name?
>
>
> Regards,
>
> Aurélien

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