Skip to main content
edited title
Link
YogaPanda
  • 859
  • 7
  • 24

Use KQL in SharePoint2010 /_vti_bin/listdata.svc

added 12 characters in body
Source Link
YogaPanda
  • 859
  • 7
  • 24

I was trying to mockup themimic a search resultssite 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" ?

I was trying to mockup the search results 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" ?

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" ?

Source Link
YogaPanda
  • 859
  • 7
  • 24

Use KQL in SharePoint2010 /_vti_bin/listdata.svc

I was trying to mockup the search results 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" ?