SearchParametersPrepareForPages Method (String, IEnumerableString, Int32, Int32, IUserInfo, 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.SearchAssembly: CMS.Search (in CMS.Search.dll) Version: 13.0.131
Syntax public static SearchParameters PrepareForPages(
string searchText,
IEnumerable<string> searchIndexNames,
int pageNumber,
int pageSize,
IUserInfo user,
bool combineWithDefaultCulture = false
)
Parameters
- searchText
- Type: SystemString
Text to search for. - searchIndexNames
- Type: System.Collections.GenericIEnumerableString
Names of indexes to perform search on. - pageNumber
- Type: SystemInt32
Number of a page for which to retrieve results, starting from 1. - pageSize
- Type: SystemInt32
Size of a page. - user
- Type: CMS.BaseIUserInfo
User for whom to filter the result. - combineWithDefaultCulture (Optional)
- Type: SystemBoolean
Indicates whether the search service uses site default language version of pages as a replacement for pages
that are not translated into the language the search performed in (see the Remarks section on details of the search culture).
Return Value
Type:
SearchParametersExceptions Exception | Condition |
---|
ArgumentNullException | Thrown when searchIndexNames is null. |
ArgumentException | Thrown when searchText is null or whitespace string. |
Remarks
This method passes Name value of CurrentUICulture as the name of culture
to search in.
See Also