Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I want to run searches with jquery and spservices library. This is what I have so far:

<script type="text/javascript" src="/js/jquery/jquery-1.10.1.min.js"></script>
<!-- <script type="text/javascript" src="http://code.jquery.com/jquery-1.9.0.js"></script> -->
<script type="text/javascript" src="/js/spservices/jquery.SPServices-2013.01.min.js"></script>

<script type="text/javascript">
    var queryText = "<QueryPacket xmlns='urn:Microsoft.Search.Query' Revision='1000'>"
    queryText += "<Query>"
    queryText += "<Range><Count>35</Count></Range>";
    queryText += "<Context>"
    queryText += "<QueryText language='en-US' type='STRING'>"
    queryText += "test";
    queryText += "</QueryText>"
    queryText += "</Context>"
    queryText += "</Query>"
    queryText += "</QueryPacket>";


    $(document).ready(function() {
        var title, url = "";

        $().SPServices({
            operation: "Query",
            queryXml: queryText,
            completefunc: searchComplete
        });
    });

    function searchComplete(xData, status) {
        var search_results = $("#result");

        $(xData.responseXML).find("QueryResult").each(function() {
            //search_results.append($(this).text());
            search_results.text($(this).text());
        });
    }
</script>

<div id="result">
</div>

With this I am getting 15000 total results. However its the count (how much records to get back) that's causing an issue.

If I use a count value of anything like 0 <= count <= 35, then it works, but if I try something > 35, then I get this:

<ResponsePacket xmlns="urn:Microsoft.Search.Response"><Response domain=""><Status>ERROR_SERVER</Status><DebugErrorMessage>Microsoft.SharePoint.SPException</DebugErrorMessage></Response></ResponsePacket>
share|improve this question
add comment

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.