Designing Search Service
Search Service is responsible for enabling users to search for tweets and user profiles based on keywords, hashtags, and other criteria in the Twitter-like service. It provides a powerful and efficient search functionality to help users discover relevant content. Let’s dive into the low-level design of Search Service. We have already seen in Figure 11.3 how Tweet Service posts the incoming tweets to the message queue, which forwards it to Search Service for index searching.
Figure 11.14 illustrates how Search Service interacts with the API gateway, message queue, and Elasticsearch. It also shows how Tweet Service and User Service feed data into the message queue for indexing.

Figure 11.14: Search Service low-level design
Let us look at the API endpoints exposed by Search Service and the data flow.
The Search Service will expose the following API endpoints:
GET/search/tweets?q={query}&limit={limit}&offset...