If possible please consider adding an implementation of DataFactory.FindPagesWithCriteria that returns a PageReferenceCollection instead of the fully populated PageDataCollection.
When performing searches that return a large number of results the page cache may overflow resulting in heavy load on the database as the collection is being populated.
Adding a parameter to limit the number of results returned by FindPagesWithCriteria would be an alternative but working with a PageReferenceCollection would be ideal.
I think that is a great idea and technically it shouldn't be a problem. I have added it to the EPiServer suggestions (Issue #30776 - FindPagesWithCriteria implementation that returns a PageReferenceCollection).
Hi.
If you don't want to wait for the feature being released, you can check out this.
EPiServer.DataAccess.PropertySearchDB search = new EPiServer.DataAccess.PropertySearchDB();
EPiServer.Core.PageReferenceCollection refColl = search.FindPagesWithCriteria(UnifiedPrincipal.CurrentSid, pageLink, criterias);
Frank :)
Thanks Frank. I found this method too and it does solve the problem. But since only a small portion of the DataAccess namespace is part of the SDK documentation maybe it would make sence to expose it through the DataFactory as well.