SearchParametersPrepareForPages Method (String, IEnumerableString, Int32, Int32, IUserInfo, String, Boolean) |
Creates a new instance of the SearchParameters class for a page search for given searchText across indexes specified in searchIndexNames. The user parameter limits search result when performing permission checks in result filtering.
Retrieves the result for the first page for invalid page numbers.
Namespace: CMS.Search
public static SearchParameters PrepareForPages( string searchText, IEnumerable<string> searchIndexNames, int pageNumber, int pageSize, IUserInfo user, string cultureName, bool combineWithDefaultCulture )
Exception | Condition |
---|---|
ArgumentNullException | Thrown when searchIndexNames is null. |
ArgumentException | Thrown when searchText is null or whitespace string. |