I was trying to mimic a search site via listdata.svc due to the incapability of OOTB Search Result webpart.
Is there'a way to utilize KQL or any other way to allow users to search for a sentence?
Here's my code:
var webServerRelativeUrl = _spPageContextInfo.webServerRelativeUrl;
$.ajax({
url: webServerRelativeUrl + "/_vti_bin/listdata.svc/Pages?$filter=(Title eq 'keyword')",
method: "GET",
headers: { "Accept": "application/json; odata=verbose" },
success: function (response) {
console.log(response.d.results[0].Title);
},
error: function (data) {
console(JSON.stringify(response));
}
});
However, users won't be able to get any results if they search for more than a word. Is there any syntax reference can help? Or there's a better way than "/_vti_bin/listdata.svc" ?