I'm trying to make a search request on the "/_vti_bin/search.asmx" page in Sharepoint Online.
I use the QueryEx method to post the request.
Here is the request:
var xmlQuery = "<QueryPacket xmlns=\"urn:Microsoft.Search.Query\">";
xmlQuery += "<Query>";
xmlQuery += "<SupportedFormats><Format>urn:Microsoft.Search.Response.Document.Document</Format></SupportedFormats>";
xmlQuery += "<Context><QueryText type=\"STRING\" >" + keyword + "</QueryText></Context>";
xmlQuery += "<SortByProperties><SortByProperty name=\"Rank\" direction=\"Descending\" order=\"1\"/></SortByProperties>";
xmlQuery += "<Properties>";
xmlQuery += "<Property name=\"SiteTitle\"/>";
xmlQuery += "<Property name=\"Title\"/>";
xmlQuery += "<Property name=\"Path\"/>";
xmlQuery += "</Properties>";
xmlQuery += "<Range><StartAt>" + startAt + "</StartAt><Count>" + count + "</Count></Range>";
xmlQuery += "<EnableStemming>" + (enableStemming ? "true" : "false") + "</EnableStemming>";
xmlQuery += "<TrimDuplicates>" + (trimDuplicates ? "true" : "false") + "</TrimDuplicates>";
xmlQuery += "<IgnoreAllNoiseQuery>" + (ignoreAllNoiseQuery ? "true" : "false") + "</IgnoreAllNoiseQuery>";
xmlQuery += "<ImplicitAndBehavior>" + (impliciteAndBehavior ? "true" : "false") + "</ImplicitAndBehavior>";
xmlQuery += "<IncludeRelevanceResults>" + (includeRelevanceResults ? "true" : "false") + "</IncludeRelevanceResults>";
xmlQuery += "<IncludeSpecialTermResults>" + (includeSpecialTermResults ? "true" : "false") + "</IncludeSpecialTermResults>";
xmlQuery += "<IncludeHighConfidenceResults>" + (includeHighConfidenceResults ? "true" : "false") + "</IncludeHighConfidenceResults>";
xmlQuery += "</Query>";
xmlQuery += "</QueryPacket>";
It returns some results, but the results come from all over the Sharepoint, not only from the site where I do my search. Is there any way to limit the scope of the search request to have only results from the site ?
Sorry for my bad english :/