1

In my Visual Web Part I need a KeywordQuery to search Most Popular Pages. Also, filter the results for Pages only.

1
  • Are you using SharePoint oob rating to determine popularity or usage analytics? Jun 4, 2016 at 12:52

1 Answer 1

1

I simply added a sort by

KeywordQuery kq = new KeywordQuery(site);
kq.SortList.Add("ViewsLifeTime", SortDirection.Descending)

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.