2

I have a list with some fields. I want to create a search page for that List in which every keyword matching the data for any list item will be returned. How can I search content in SharePoint List using CAML query in JSOM.

3
  • 1
    Is you site a publishing web? if so then I suggest you choose content search web part instead writing code.
    – Asad Refai
    Commented Nov 10, 2015 at 7:12
  • Yes.. How can I implement that in content editor webpart only Commented Nov 10, 2015 at 7:19
  • Content search webpart is provided by SharePoint OOB. It is used to display data from the query supplied by user. And that supplying of query can be from a search box as you need in your case. I dont think so you need a Content Editor Web Part.
    – Asad Refai
    Commented Nov 10, 2015 at 7:23

1 Answer 1

1

Since your site is a Publishing Web, the best approach will be to use SharePoint's OOB Content By Search Web Part. These CSWP can be placed on your page.

How the Content Search Web Part works

Content Search Web Part displays search results in a way that you can easily format. Each Content Search Web Part is associated with a search query and shows the results for that search query.

You can use display templates to change how search results appear on the page. Display templates are snippets of HTML and JavaScript that render the information returned by SharePoint. The information to be displayed gets inserted into the page in JSON format.

If you are unaware of CSWP then read Configure a Content Search Web Part in SharePoint and Using the Content Search web part (and understanding SP2013 search)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.