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.


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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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