People Search and a Custom Property

I am trying to surface a custom property in the people search query results. For example,

http://<servername:port>/_api/search/query?querytext='*'&sourceid='B09A7990-05EA-4AF9-81EF-EDFAB16C4E31'

I get XML results but when I look at the properties returned for each of the people result, there are no custom properties from user profile properties. How can I modify the custom properties so that they start showing in the XML results for people search?

Rank, DocId, AboutMe, AccountName, BaseOfficeLocation, Department etc.

Please let me know.

Thanks!



Update: I am using SearchExecutor class and its ExecuteQuery API.
April 27th, 2015 1:09pm

Found the answer.

I had to add custom properties to the "Query" object using SelectedProperties class's Add method

query.SelectProperties.Add

  • Marked as answer by diffident 10 hours 43 minutes ago
Free Windows Admin Tool Kit Click here and download it now
April 27th, 2015 4:54pm

Hi,

Thank you for your sharing! It will be beneficial to others in this forum who meet the same issue in the future.

Best Regards,

Wendy

April 27th, 2015 10:09pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics