Open GoogleCodeExporter opened 9 years ago
Example of my view... map function:
function(doc) {
if (doc._id.indexOf('cxmldocument-') === 0) {
for(i=0;i<doc.XDoc.presscovers.cover.length; i++)
{
emit(doc.XDoc.presscovers.cover[i].collectioncode, doc.XDoc.presscovers.cover[i]);
}
}
}
Sample document:
{"_id":"cxmldocument-44355d78-6fb3-4f2c-9662-7bc72a997ef3","_rev":"1-dd2234e7657
bc0be1b64b6fe133d5b5c","XDoc":{"?xml":{"@version":"1.0","@encoding":"utf-8"},"pr
esscovers":{"cover":[{"collectioncode":"HCBOOK","size":"8x10","productcode":"PB0
11","covertype":"CANVAS","covercode":"PB070","description":"PRINTED
IMAGE-CANVAS","prefixorderleveloptionwithsize":"TRUE"},{"collectioncode":"HCBOOK
","size":"10x18","productcode":"PB012","covertype":"CANVAS","covercode":"PB071",
"description":"PRINTED
IMAGE-CANVAS","prefixorderleveloptionwithsize":"TRUE"},{"collectioncode":"HCBOOK
","size":"12.5x10","productcode":"PB013","covertype":"CANVAS","covercode":"PB072
","description":"PRINTED
IMAGE-CANVAS","prefixorderleveloptionwithsize":"TRUE"},{"collectioncode":"HCBOOK
","size":"8x10","productcode":"PB011","covertype":"GLOSS","covercode":"PB061","d
escription":"PRINTED
IMAGE-GLOSSY","prefixorderleveloptionwithsize":"TRUE"},{"collectioncode":"HCBOOK
","size":"10x18","productcode":"PB012","covertype":"GLOSS","covercode":"PB062","
description":"PRINTED
IMAGE-GLOSSY","prefixorderleveloptionwithsize":"TRUE"},{"collectioncode":"HCBOOK
","size":"12.5x10","productcode":"PB013","covertype":"GLOSS","covercode":"PB063"
,"description":"PRINTED
IMAGE-GLOSSY","prefixorderleveloptionwithsize":"TRUE"},{"collectioncode":"HCBOOK
","size":"8x10","productcode":"PB011","covertype":"SATIN","covercode":"PB061","d
escription":"PRINTED
IMAGE-SATIN","prefixorderleveloptionwithsize":"TRUE"},{"collectioncode":"HCBOOK"
,"size":"10x18","productcode":"PB012","covertype":"SATIN","covercode":"PB062","d
escription":"PRINTED
IMAGE-SATIN","prefixorderleveloptionwithsize":"TRUE"},{"collectioncode":"HCBOOK"
,"size":"12.5x10","productcode":"PB013","covertype":"SATIN","covercode":"PB063",
"description":"PRINTED
IMAGE-SATIN","prefixorderleveloptionwithsize":"TRUE"},{"collectioncode":"HCBOOK"
,"size":"8x10","productcode":"PB011","covertype":"METALLIC","covercode":"PB073",
"description":"PRINTED
IMAGE-METALLIC","prefixorderleveloptionwithsize":"TRUE"},{"collectioncode":"HCBO
OK","size":"10x18","productcode":"PB012","covertype":"METALLIC","covercode":"PB0
74","description":"PRINTED
IMAGE-METALLIC","prefixorderleveloptionwithsize":"TRUE"},{"collectioncode":"HCBO
OK","size":"12.5x10","productcode":"PB013","covertype":"METALLIC","covercode":"P
B075","description":"PRINTED
IMAGE-METALLIC","prefixorderleveloptionwithsize":"TRUE"},{"collectioncode":"ACCO
RDIONMINIS","size":"3x3","productcode":"MS014","covertype":"SATIN","covercode":"
PR154","description":"PRINTED
IMAGE-SATIN","prefixorderleveloptionwithsize":"FALSE"},{"collectioncode":"ACCORD
IONMINIS","size":"3x3","productcode":"MS014","covertype":"METALLIC","covercode":
"PR155","description":"PRINTED
IMAGE-METALLIC","prefixorderleveloptionwithsize":"FALSE"},{"collectioncode":"ACC
ORDIONMINIS","size":"3x3","productcode":"MS121","covertype":"SATIN","covercode":
"PR220","description":"PRINTED
IMAGE-SATIN","prefixorderleveloptionwithsize":"FALSE"},{"collectioncode":"ACCORD
IONMINIS","size":"3x3","productcode":"MS121","covertype":"METALLIC","covercode":
"PR221","description":"PRINTED
IMAGE-METALLIC","prefixorderleveloptionwithsize":"FALSE"},{"collectioncode":"ACC
ORDIONMINIS","size":"2.5x3.5","productcode":"MS015","covertype":"SATIN","coverco
de":"PR156","description":"PRINTED
IMAGE-SATIN","prefixorderleveloptionwithsize":"FALSE"},{"collectioncode":"ACCORD
IONMINIS","size":"2.5x3.5","productcode":"MS015","covertype":"METALLIC","coverco
de":"PR157","description":"PRINTED
IMAGE-METALLIC","prefixorderleveloptionwithsize":"FALSE"},{"collectioncode":"ACC
ORDIONMINIS","size":"2.5x3.5","productcode":"MS120","covertype":"SATIN","coverco
de":"PR222","description":"PRINTED
IMAGE-SATIN","prefixorderleveloptionwithsize":"FALSE"},{"collectioncode":"ACCORD
IONMINIS","size":"2.5x3.5","productcode":"MS120","covertype":"METALLIC","coverco
de":"PR223","description":"PRINTED
IMAGE-METALLIC","prefixorderleveloptionwithsize":"FALSE"},{"collectioncode":"ACC
ORDIONBOOKS","size":"4x8","productcode":"CD063","covertype":"SATIN","covercode":
"PR158","description":"PRINTED
IMAGE-SATIN","prefixorderleveloptionwithsize":"FALSE"},{"collectioncode":"ACCORD
IONBOOKS","size":"4x8","productcode":"CD063","covertype":"METALLIC","covercode":
"PR159","description":"PRINTED
IMAGE-METALLIC","prefixorderleveloptionwithsize":"FALSE"},{"collectioncode":"ACC
ORDIONBOOKS","size":"4x8","productcode":"CD063","covertype":"SATIN","covercode":
"PR170","description":"PRINTED
IMAGE-SATIN","prefixorderleveloptionwithsize":"FALSE","fullproductcontains":"FLA
P"},{"collectioncode":"ACCORDIONBOOKS","size":"4x8","productcode":"CD063","cover
type":"METALLIC","covercode":"PR171","description":"PRINTED
IMAGE-METALLIC","prefixorderleveloptionwithsize":"FALSE","fullproductcontains":"
FLAP"},{"collectioncode":"ULTIMATEALBUM","size":"10x10","productcode":"UA009","c
overtype":"GL","covercode":"GL009","description":"PRINTED
IMAGE-GLOSSY","prefixorderleveloptionwithsize":"FALSE"},{"collectioncode":"ULTIM
ATEALBUM","size":"10x10","productcode":"UA009","covertype":"ST","covercode":"ST0
09","description":"PRINTED
IMAGE-SATIN","prefixorderleveloptionwithsize":"FALSE"},{"collectioncode":"ULTIMA
TEALBUM","size":"10x10","productcode":"UA009","covertype":"MT","covercode":"MT00
9","description":"PRINTED
IMAGE-METALLIC","prefixorderleveloptionwithsize":"FALSE"},{"collectioncode":"ULT
IMATEALBUM","size":"10x10","productcode":"UA009","covertype":"CV","covercode":"C
V009","description":"PRINTED
IMAGE-CANVAS","prefixorderleveloptionwithsize":"FALSE"},{"collectioncode":"ULTIM
ATEALBUM","size":"10x10","productcode":"UA009","covertype":"GL","covercode":"GL0
09","description":"PRINTED
IMAGE-GLOSSY","prefixorderleveloptionwithsize":"FALSE","fullproductcontains":"TH
ICK"},{"collectioncode":"ULTIMATEALBUM","size":"10x10","productcode":"UA009","co
vertype":"ST","covercode":"ST009","description":"PRINTED
IMAGE-SATIN","prefixorderleveloptionwithsize":"FALSE","fullproductcontains":"THI
CK"},{"collectioncode":"ULTIMATEALBUM","size":"10x10","productcode":"UA009","cov
ertype":"MT","covercode":"MT009","description":"PRINTED
IMAGE-METALLIC","prefixorderleveloptionwithsize":"FALSE","fullproductcontains":"
THICK"},{"collectioncode":"ULTIMATEALBUM","size":"10x10","productcode":"UA009","
covertype":"CV","covercode":"CV009","description":"PRINTED
IMAGE-CANVAS","prefixorderleveloptionwithsize":"FALSE","fullproductcontains":"TH
ICK"}]}}}
Original comment by thingi...@gmail.com
on 9 Nov 2012 at 10:00
Original issue reported on code.google.com by
thingi...@gmail.com
on 9 Nov 2012 at 9:57