Hi Paul,
You can do it something like this:
var condition = SearchSyntaxHelper.CombineSearchCondition("search query",
new SearchCondition
{
DocumentCondition = new DocumentSearchCondition
{ ClassNames = "custom.pagetype.classname", Culture = "en-US" }
});
var parameters = new SearchParameters
{
SearchFor = condition,
Path = $"{searchRootAliasPath}%",
CombineWithDefaultCulture = false,
CheckPermissions = false,
SearchInAttachments = false,
User = MembershipContext.AuthenticatedUser,
SearchIndexes = Constants.SearchIndexes.SearchIndex,
StartingPosition = skip,
NumberOfProcessedResults = ((Int64)skip + (Int64)take) >= (Int64)Int32.MaxValue ? Int32.MaxValue : skip + take,
DisplayResults = take,
SearchSort = searchSort
};
var searchResults = SearchHelper.Search(parameters);