Something like;
fun({Props}) ->
couch_util:get_value(<<"type">>, Props) == <<"tile">> andalso
couch_util:get_value(<<"key">>, Props) /= undefined andalso
byte_size(couch_util:get_value(<<"key">>, Props)) =< 8
end.On 7 January 2013 12:12, Stock, Ingemar <[email protected]> wrote: > function(doc){ > if(doc.type === "tile"){ > return doc.key.length <= 8; > }else{ > return true; > } > }
