I have 2 collections, one empty (artvalid) and the other one with some documents (artarchive). The documents in both collections are from the same schema and i want to copy all document with the appropriate year value from artarchive to artvalid, but no documents are copied with this query:
update insert
for $art in collection('artarchive')/article
where $art/date1/year='2005' or $art/date2/year='2005'
return $art
into collection('artvalid')