incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Candler <B.Cand...@pobox.com>
Subject Re: handling keys in the REST view API
Date Tue, 02 Jun 2009 09:14:06 GMT
On Fri, May 29, 2009 at 11:47:47AM +0200, Peter Maas wrote:
> The next step would be to add stemming, not to hard either (have a  
> working prototype already). This does however present me with a new  
> problem. I'd like to stem the provided keys in the REST parameters using 
> the same stemmer used by the mapping code. Is there a way to process the 
> parameters passed to a REST view within CouchDB? Or would I need to 
> duplicate (port) the stemmer in the clients (which are various in various 
> languages)?

I'm afraid the latter. I have quite a bit of logic duplicated between
Javascript and Ruby (e.g. parsing of IP addresses)

To make this sane, I put the source code side-by-side, and I use the same
unit tests for both: that is, I write out the test values as docs and then
shove out the Javascript as part of a temp_view, and check what comes back.

Mime
View raw message