incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Manolo Padron Martinez <manol...@gmail.com>
Subject Filtering with a pattern
Date Tue, 03 Mar 2009 14:29:31 GMT
Hi again:

Another newbie question.

I have some docs in this form:

{
  "Temperature":23.4,
  "Endurance":5,
  "Element":"Fe"
}

I would like to make a view that show all the docs that have some X
temperature, an endurance between Y and Z values and a W element. But the
ranged value could be any of the properties (or all properties)

I thought If I make a map function that emit an array of this kind (
["Temperature",23.4],["Endurance",5],["Element","Fe]]  )   for every
document I could filter it with startkey and endkey, but doesn't work as I
wish.

Anyone knows how can I make a view that let me filter in that way?

Thanks in advance

Regards from Canary Islands

Manuel Padron Martinez

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