Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

If this in not the right place for this query take my apology.

I am in mid of creating a search client application. I got stuck while retrieving result source and schema. I found that, it can be achieved using SharePoint model. I need to use REST api.

Can anyone explain how to retrieve result sources and search schema from SharePoint 2013?

I fed up with exploring for documents / post / articles to read. Can any one explain?

It will be more useful to develop the search application.

Thanks in advance.

share|improve this question
add comment

1 Answer

After lot of stumble and hit, finally I found a possible solution to retrieve Result Source from client (CSOM / REST).

As per the design, Result Source can be created in the Site level settings itself. We can retrieve the custom result source from the site level using the SearchExportConfiguration method from SearchConfigurationPortability class.

If this doesn't work, we can use HTTP web request to get the search export configuration as an XML file by using the following URL. "http://hostname/sitename/_layouts/15/exportsearchconfiguration.aspx?level=site"

We can retrieve custom result sources GUID by parsing the XML result. We can get the default result source as you list out here Default Result Source.

I think this will help you.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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