couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nils Breunese <>
Subject RE: get by property
Date Fri, 23 Sep 2011 12:10:29 GMT
You could create views for every property you want to be able to use as a lookup key (by_flash,
by_ram, by_eeprom, by_package) and emit the property value as the key: emit(property_value,
null); Then you can query the view for the property you're looking for, e.g /db/_design/ddoc/_view/by_flash?key="8kbyte"

Or you could create a single view which indexes all properties with their values by emitting
the property key and value as a complex key: emit([property_key, property_value], null); Then
you can query the view like this: /db/_design/ddoc/_view/all_properties?key=["Flash","8kbyte"]

Van: Markus Burrer []
Verzonden: vrijdag 23 september 2011 11:14
Onderwerp: get by property

Hi, I have a document like this


I want to get all documents with the same property, for example with the
package "DIP28S" or all docs with the property "RAM":"1kByte".

How should the view look like?

Kind Regards

View raw message