Function

$().SPServices

Web Service

Search

Supported Operations

Operation Options MSDN Documentation Introduced
GetPortalSearchInfo None QueryService.GetPortalSearchInfo Method 0.3.0
GetQuerySuggestions queryXml QueryService.GetQuerySuggestions Method 0.7.0
GetSearchMetadata None QueryService.GetSearchMetadata Method 0.3.0
Query queryXml QueryService.Query Method 0.3.0
QueryEx queryXml QueryService.QueryEx Method 0.3.0
Registration registrationXml QueryService.Registration Method 0.7.0
Status None QueryService.Status Method 0.3.0

Last edited Dec 4, 2011 at 6:56 PM by sympmarc, version 4

Comments

tvpham Mar 6, 2015 at 2:08 AM 
Sorted it out:

var keyword = "keyword";
var queryText = "<QueryPacket xmlns=\"urn:Microsoft.Search.Query\" Revision=\"1\">"
queryText += "<Query domain=\"QDomain\">"
queryText += "<Context><QueryText language=\"en-US\" type=\"STRING\">"
queryText += keyword;
queryText += "</QueryText></Context>"
queryText += "<Range><StartAt>1</StartAt><Count>8</Count></Range>"
queryText += "<PreQuerySuggestions>true</PreQuerySuggestions>"
queryText += "<HighlightQuerySuggestions>false</HighlightQuerySuggestions>"
queryText += "</Query>"
queryText += "</QueryPacket>";
$().SPServices({
operation: "GetQuerySuggestions",
queryXml: queryText,
completefunc: function(xData, Status) {
$(xData.responseXML).find("GetQuerySuggestionsResult").find("string").each(function() {
console.log($(this).text());
});
}
});

tvpham Mar 5, 2015 at 1:57 PM 
Please can someone give me an example of how to use GetQuerySuggestions operation?

anitaboerboom Sep 24, 2010 at 7:52 PM 
Check for an example of the query operation:
http://www.itidea.nl/index.php/example-of-using-the-spservices-search-web-service/