0

I am currently using SP2010 and spservices to make SOAP requests for search. I am doing this client sided using javascript/jquery . But now I want to use REST and still on client side. This is my SOAP version in javascript:

var queryText;
queryText = "<QueryPacket xmlns='urn:Microsoft.Search.Query' Revision='1000'>";
queryText += "<Query>";
queryText += "<Context>";
queryText += "<QueryText language='en-US' type='MSSQLFT'>";
queryText += "SELECT Title, Rank, Size, Description, Write, Path FROM Scope() WHERE CONTAINS ('" + text.replace(/ /g, "+") + "') AND ((\"SCOPE\" = '" + scope + "')) ORDER BY \"Rank\" DESC";
queryText += "</QueryText>";
queryText += "</Context>";
queryText += "<Range><Count>" + searchLimit + "</Count></Range>";

queryText += "<TrimDuplicates>false</TrimDuplicates>";
queryText += "<IgnoreAllNoiseQuery>false</IgnoreAllNoiseQuery>";
queryText += "<IncludeSpecialTermResults>true</IncludeSpecialTermResults>";
queryText += "<IncludeRelevantResults>true</IncludeRelevantResults>";
queryText += "<IncludeHighConfidenceResults>true</IncludeHighConfidenceResults>";

queryText += "</Query>";
queryText += "</QueryPacket>";

Can anyone please show my how to do this same thing in REST?

Thanks.

1

There is no REST search service in 2010. Only listdata.svc for lists and ExcelRest.aspx for excel services.

  • What about this: chaholl.com/archive/2011/08/31/… (however this is c#) – omega Jul 3 '13 at 18:34
  • 1
    Didn't realized you were talking about creating a service. Yes, you can create a restful web service to implement SharePoint search. I did something similar with the Exchange Web Service to push SharePoint calendar events to people's Outlook calendars – Blue Murphy Jul 3 '13 at 18:54

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.