元のコレクションと intersection パラメータで指定された文書に共通の文書を含む文書コレクションを作成します。
intersect(removalspecifier:NotesDocument) : void
intersect(removalspecifier:NotesDocumentCollection) : void
intersect(removalspecifier:NotesForm) : void
intersect(removalspecifier:int) : void
intersect(removalspecifier:NotesNoteCollection) : void
intersect(removalspecifier:string) : void
intersect(removalspecifier:NotesView) : void
// Open DXL file
var stream:NotesStream = session.createStream();
var filename:string = "c:¥¥dxl¥¥";
filename = filename + database.getFileName();
filename = filename.substring(0, filename.length() - 3) + "dxl";
if (stream.open(filename)) {
requestScope.status = "Opened " + filename;
stream.truncate();
// Create note collection
var nc:NotesNoteCollection = database.createNoteCollection(false);
nc.setSelectDocuments(true);
nc.buildCollection();
// Keep notes that meet search
var dc:NotesDocumentCollection = database.FTSearch(requestScope.query);
if (dc.getCount() > 0) {
nc.intersect(dc); // this crashing - not sure why
}
// Export note collection as DXL
var exporter:NotesDxlExporter = session.createDxlExporter();
var output:string = exporter.exportDxl(nc);
stream.writeText(output);
stream.close();
requestScope.status = requestScope.status + "¥n" + nc.getCount() +
" notes written to " + filename;
} else {
requestScope.status = "Cannot open " + filename;
}