Try our conversational search powered by Generative AI!

FindPagesWithCriteria - is there any way to limit the number of pages returned?

Vote:
 
We need to implement our own pageable control which lists pages in the reverse order of publication that a certain property contains some strings. The search result on our control can easily return thousands and thousands of pages since it's a portal that will be heavily accessed and edited. Fetching thousands of pages the FindPagesWithCriteria does not seem to quite cut it for us - even our test site search with only about 5000 pages (1 out of each 3 meeting our criteria) causes the search execution to take about 2 seconds. Not to mention that there is no facility (that we could find) to sort them by e.g. date, while still in database. I guess what I would need to know is - Is there any API to fetch the pages ordered by date/time that would allow us to page the very search while it occurs or do we have to write it ourselves? Also if this is something that needs to be written by us, do you think that going with just searching the properties with our own queries is the way to go or should we rather build our own DB table for full-text searching it? Cheers, Adam
#13003
Apr 11, 2007 12:27
Vote:
 
PageDataCollection result = (EPiServer.DataFactory.Instance.FindPagesWithCriteria(RootNode, CriteriaCollection));
FilterSort SortFilter = new FilterSort(FilterSortOrder.PublishedDescending);
SortFilter.Sort(result);
FilterCount CountFilter = new FilterCount(4);
CountFilter.Filter(result);
#19922
May 14, 2008 15:45
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.