Hello Dave,
I have tested your code (as part of regular web part) with some modifications, and it is working correctly for me. Could you please debug you code and send me the values assigned to the parameters?
This is what I have tested:
SearchParameters parameters = new SearchParameters()
{
SearchFor = txtSearchInput.Text,
SearchSort = SearchHelper.GetSort("##SCORE##"),
Path = txtSearchPath.Text,
ClassNames = "CMS.MenuItem",
CurrentCulture = "EN-US",
DefaultCulture = CultureHelper.DefaultCulture.IetfLanguageTag,
CombineWithDefaultCulture = false,
CheckPermissions = true,
SearchInAttachments = false,
User = (UserInfo)CMSContext.CurrentUser,
SearchIndexes = "CorporateSite.Default",
StartingPosition = 0,
DisplayResults = 100,
NumberOfProcessedResults = 100,
NumberOfResults = 0,
AttachmentWhere = String.Empty,
AttachmentOrderBy = String.Empty,
BlockFieldOnlySearch = false,
};
And again it is not showing up the archived documents. If you send me the exact values assigned to the parameters, I will try some more tests.
Regards,
Josef Dvorak