Thursday, December 27, 2012 1:28 PM
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.
Thursday, December 27, 2012 1:43 PM
please review these items
This rest query tool might be helpful:
Thursday, December 27, 2012 1:50 PM
Thanks Alexey for quick reply.
I had referred those links and its not explaining about retrieving of result sources and search schema available in the sharepoint server. Can u give some code snippet using REST api. It will be useful for me.
Thanks in advance.
Thursday, December 27, 2012 1:58 PM
if you're interested in search schema and result sources in particular, then I'm not sure it's available via current REST API -since it's not described in protocol here
- Edited by Alexey Kozhemiakin Thursday, December 27, 2012 2:01 PM
Thursday, December 27, 2012 2:09 PM
This concludes REST api do not completely support search in sharepoint 2013?
Any alternate direction to work for client application?
Thursday, December 27, 2012 2:13 PM
could you describe what are the reasons for your client application to perform configuration of search? This may help to suggest you a better way out of this situation.
I believe existing API is aimed mostly for search consumers, this could explain why not all search capabilities are exposed to REST.
Thursday, December 27, 2012 2:20 PM
I want to create an application which will be running from client machine to search contents specified text as input. Since server want to be secure and not to allow strangers, I want to use client application. I had constructed REST query to search contents for Full text query. This works great. When come to search using Property Restriction, I need the collection of search schema and result source for creating search query using REST API.
Can u help me?
Wednesday, January 02, 2013 2:49 AM
A list of managed properties is not available in CSOM or REST. It can still be retrieved using the Search.asmx web service GetSearchMetadata method. This is still available in SP2013. A list of result sources is not available from any remote api. You will have to do your own custom web service for this.
Thursday, January 03, 2013 6:32 AM
Thank you Steve.
I have one question for you.
Is this issue in RTM or design of SharePoint 2013 search architecture?
Why I am asking this is, I need to work from client application only and no custom web services / SharePoint Object Model.
Sunday, January 06, 2013 4:25 AMThis is by design and I don't agree with it. The search.asmx is listed as deprecated but still can be used, however, it cannot be used from the on premises app model.
Monday, January 07, 2013 4:39 AM
Is there any documents officially released by Microsoft related to the stated issue? If so, please provide me the link to download the document.
- Edited by x8_carti Monday, January 07, 2013 4:58 AM
Wednesday, January 09, 2013 3:32 PM
There are quite a bit of challenges about Result Sources that I find quite frustrating.
- A GUID is required to use them
- They can't be passed to the ResultScriptWebPart by query string (from what I can tell)
- They can't be created with PowerShell
- There is no way to retrieve a list of them via CSOM / REST
The latter makes developing an app around them next to impossible. The only good news is that most of the built-in ones always have the same GUIDs.
Tuesday, January 15, 2013 7:25 AM
Thank you very much Corey.
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.
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.