This video is available to students only

Adding Search Functionality

In this lesson, we're going to add search functionality

Adding search functionality#

We have added sorting, filtering and pagination features to our API so far. One of the most important feature is to search for the courses by their name. We don't have to create anything from scratch. We already have our Criteria set up — this is another criteria we need to add. So let's see how to implement this.

This will be part of our CourseParams which we have already set up. Let's go there and add an additional Search property. We will create a private search property which we will return, so let's create that. Type string_search. We will create a public property now; it will get the private search field and when we set it, we want the value to be converted into lower string so that we're matching things on similar ground.


Start a new discussion. All notification go to the author.