couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Newson <robert.new...@gmail.com>
Subject Re: Howto (example) needed for reduce function
Date Sun, 30 Jan 2011 17:54:19 GMT
Steffen,

There is a reply to the original thread where you posted the exact
same question. It makes it hard to respond to requests if you start
new and identical threads and ignore earlier replies.

B.

On Sun, Jan 30, 2011 at 5:36 PM, Jan Lehnardt <jan@apache.org> wrote:
> Hi Steffen,
>
> I have a hard time following your question. Can you explain the details
> of your input and output a little better and maybe try to rephrase what
> you want to achieve?
>
> Cheers
> Jan
> --
>
> On 30 Jan 2011, at 08:00, Steffen Mutter wrote:
>
>> Hello!
>>
>> I have a view like this:
>> function(doc) {
>> emit(doc.heim,null);
>> emit(doc.gast,null);
>> }
>> reduced like this:
>> function(keys, values) {
>>  return true;
>> }
>>
>> Giving me results like this:
>>
>> "SG Stutensee"        true
>> "SG Stutensee 2" true
>> "SG Stutensee 3" true
>> "SG Stutensee 4" true
>>
>> What I want is:
>> reduce the results and cut off the last numbers at the end of the club
>> name (if any) when single and have a space before the number to get a
>> single result for a handball club (which actually shows all the teams
>> for a club)
>>
>> Is there any way to get it done?
>>
>> Kind regards,
>> Steffen
>>
>
>

Mime
View raw message