...

/

Refinements in the Search API

Refinements in the Search API

Learn how we can evolve the search API by adding new features.

The purpose of this lesson is to learn how we can enhance the functionality of the search API by adding a new feature. Our API already supports some basic features. For example, sorting improves the user experience, whereas pagination reduces unnecessary load on the network. However, we need a feature that allows our users to refine the search criteria to find specific data.

To achieve that, we’ll need to add the filtering functionality along with appropriate versioning.

  • Filtering: This section introduces filtering, its types, and discusses how clients can interact with the search service to request filtering.

  • Versioning: This section focuses on versioning and discusses the versioning semantics required to support filtering.

Let's start with how to add filtering to the existing design of the search API.

Filtering

Filtering is the process of restricting search results based on the user's requirements or criteria. It is a crucial ability in the search feature. For example, it’s possible to filter search results to return only images and videos. ...