OK, hier ist Beispiel 1:
http://www.atnotes.de/index.php?board=5;action=display;threadid=15495
Dort finde ich es ganz praktisch, alle Dokumente, die einem bestimmten Kriterium entsprechen, erst mal in eine Doc-Collection zu holen. Geht hier sicherlich auch ohne 2. Collection.
Beispiel 2:
Man will, dass Dokumente in einer Collection sortiert sind (anhand View-Sortierung):
Set view = db.GetView(CVIEWNAME)
Set coll = view.GetAllDocumentsByKey("xxyyzzxxyyzz")
Set vc = view.AllEntries
Set entry = vc.GetFirstEntry
While Not entry Is Nothing
Set doc2 = entry.Document
If XXX Then 'xxx = irgend eine Bedingung
Call coll.AddDocument(doc2)
End If
Set entry = vc.GetNextEntry(entry)
Wend
Der Beispielcode steckt in einer Function, die eine entsprechende DocCollection zurückgibt.