Indexing, searching, sorting, and paging content using a search query
While working with a large number of content items, it's always recommended to use the content search API with Lucene or Solr indexing.
In this recipe, we will create a listing page for products, where we will search products by their name, order them by product fields, and page the results using the Sitecore ContentSearch LINQ API.
Getting ready
This recipe assumes that you are using Sitecore 8 or a later version. For this recipe, create a Book
template with a few fields such as Title
, Author
, Price
, and so on and create multiple book items using this template. Also, make sure that you have indexed all these items. From the Content Editor ribbon, you can find different options ...
Get Sitecore Cookbook for Developers now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.