Can anyone help me with SharePoint 2010 KeywordQuery problem? I have the following code to search user profile and sort results by managed property.

var keywordQuery = new KeywordQuery(site)
    QueryText = "",
    KeywordInclusion = KeywordInclusion.AllKeywords,
    HiddenConstraints = "scope:" + "\"People\"",
    ResultTypes = ResultType.RelevantResults,
    RankingModelId = "D9BFB1A1-9036-4627-83B2-BBD9983AC8A1"

keywordQuery.EnablePhonetic = true;
keywordQuery.EnableNicknames = true;
keywordQuery.ResultsProvider = SearchProvider.SharepointSearch;

keywordQuery.SortList.Add("WorkEmail", SortDirection.Ascending);


ResultTableCollection resultTableCol = keywordQuery.Execute();
ResultTable resultTable = resultTableCol[ResultType.RelevantResults];

When I use WorkEmail as the property to sort by everything is working as expected.

But when I replace WorkEmail with say JobTitle sorting does not work. It behaves as if the sort list passed to KeywordQuery is empty.

My view is that something wrong with managed properties metadata. MaxCharactersInPropertyStoreIndex is set to 64 for both mentioned properties.

1 Answer 1


Bit of a delayed reply on this but this might help someone else - even with SharePoint 2013.

If you recently changed the MaxCharactersInPropertyStoreIndex property of a managed property you'll most likely have to do a full crawl of the content source before it will take effect and be sortable.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.