I am using the blog template in SharePoint 2010 and want to provide a Search feature that only returns items within the Posts lists in order to allow users to search through posts based on keywords.
You can define a new search scope for the site collection.. add the scope to the desired site and use it..
The important points while creating the scope to only search in a specific list is that:
Scope Rule Type: Web Address
In Web Address select Folder and type the url of custom list e.g.
And when the scope is ready, the following rule:
Select Scope Rule Type is Property Query(Author=John Doe)
In Property Query section, select contentclass in Add property restrictions combo box.
In text box type STS_ListItem_GenericList
Please have a look at following posts:
You can use REST api or CSOM to perform a list search for a client-side solution. If you know what columns to search for the keyword, take a look at: Using REST call to retrieve SharePoint list items as an array of JSON objects
For server side: See https://splistfilter.codeplex.com/ can get you started.