REST API and best bets / query rules

Is there a bug in this?  I can not get best bet results regardless of the query string.  For example, the following (according to MSDN documentation) should process the query rules and return a best bet.  But it doesnt.  Am I doing something wrong in the query?  It only seems to return ordinary results.  Performing the same search via Sharepoint's UI returns the best bet at the top.

$.ajax({
        url: "http://myserver/sites/mysite/_api/search/query/?processbestbets=true&enablequeryrules=true&querytext='" + searchText + "'",
        type: 'GET',
        headers: {
                   "accept": "application/json; odata=verbose"
               },
        success: myCallback,
        error: function(data) {
            alert(data.responseXML.text);
        }
    });


April 28th, 2015 7:52pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics