How can we send a request to the sharepoint search service? - search

can somebody explain to me how can we send a request to the sharepoint search service?
i am going to start developping on sharepoint 2013.
Thank you for your help

if you want to use rest api then you can download the following search tool
http://blogs.msdn.com/b/nadeemis/archive/2012/11/10/sharepoint-2013-search-query-tool-released-on-codeplex.aspx
you put the values and you will get the rest api query.
To use search client object model follow the below link
http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2012/09/10/how-to-query-search-with-the-sharepoint-2013-client-object-model.aspx
Hope it helps

Related

Which SharePoint API to use JSOM or REST?

I am a SharePoint novice and need help to determine which api set to use. I have given task to develop an outlook web add-in which will be side loaded to client's computer. This add-in will perform search on SharePoint lists and access content types and allow to move emails to SharePoint.
I have two options from what Choose the right API set tells me, REST OR JSOM.
It says to use JSOM but I am favoring little towards using REST.
My Concerns using REST is if it supports
External content types. I used Microsoft.BusinessData.MetadataModel.Entity in .NET CSOM?
Managed Meta Data/TaxonomyFieldTypes?
Are there any benefits of using one on another?
Really appreciate any comments or suggestions :)
Thanks for reading.
Yes,rest support both of them.
rest update managed matadata:
https://github.com/SharePoint/sp-dev-docs/issues/4758

SharePoint Online REST: Search vs accessing list directly

so I have been to a sharepoint on premise training some time ago. I just recently started developing an app for sharepoint online. I do remember the tutor saying that it would be better to query the search api instead of sending requests querying the list directly. Apparently it has something to do with the indexes, so all in all it would be faster and save ressources.
Now I am on SharePoint Online. Ressources are no problem, I suppose.
Is there any reason to send ajax requests to the sharepoint search api instead of calling the rest calls for a list? The data I would like to query is inside the the same site collection as my app. When to use what? Unfortunately I could not find a comparison. I'd be thankful if anybody with a deeper understanding can give some insights.
Thank you very much.

Searching with Office 365 Unified API

I am having trouble using the new Office 365 Unified API for searching for email. I would really appreciate it if I could get some help.
I get the following error:
{"error":{"code":"ErrorInvalidArgument","message":"The value specified for search scope 'PrimaryMailbox' is invalid."}}
I was able to get the access token for graph.microsoft.com and retrieve all the messages from my inbox by doing a GET to "https://graph.microsoft.com/beta/me/messages".
However, when I add the search parameter $search="Tomcat", I get the error copied above. Any ideas how I can resolve this? Is there any documentation to clarify this? I have searched the Office Dev Center documentation in detail but could not find anything to help with searching in the Unified API. Eventually, I want to use the Unified API to search for users' contacts, calendar entries, OneDrive files, and SharePoint online.
On a related note, I can successfully search for mail messages using the existing Office 365 API by making a GET call to "https://outlook.office365.com/api/v1.0/me/messages". However, I am more interested in the streamlined Unified API approach and hope I can resolve the above issue.
Also, is there a way to search all mailboxes in a single search using either the existing API (https://outlook.office365.com) or the new Unified API (https://graph.microsoft.com/)?
Thanks.
Mohammad
San Jose, CA
The Unified API preview documentation lists all supported query parameters, and $search isn't included. It does support $filter, so you can do some basic searches using that.
The Mail API does support $search, but there is no way to search across multiple mailboxes in one query.
You can use the below conditions for searching in outlook
to search in particular folder(Ex: Drafts,Inbox)--/me/MailFolders/Inbox/messages?$search={1} : where 1 will be your search text
If you want to search in all folders then /me/MailFolders/Allitems/messages?$search={1}: where {1} is the text you want to search

sharepoint web service

I'm trying to access the version history data from a sharepoint list with a web service.
I'm able to get the 'list' data, but I'm having troubles with accessing the version history.
Any help?
Thanks,
You can use GetVersionCollection method of ListsWebService

SharePoint API to get Crawling information

I'm trying to create a custom report that shows Current Crawling Time/Duration with Status on either Full or Incremental Crawl.
Does anyone know what the API that I can use to get such the information?
It is the Microsoft.Office.Server.Search.Administration.CrawlHistory class.
The SDK even has an article on this:
http://msdn.microsoft.com/en-us/library/cc789570.aspx
Not sure of the name but here is a good series of articles on the search API and may point you in the correct direction if someone cannot provide the full name.
http://www.helloitsliam.com/archive/2009/05/01/moss2007-–-using-the-search-api-part-1.aspx

Resources