The next step would be to aggregate results of the search terms from the multiple instances of Librarian and return them as a payload to the query request. This would require us to do the following:
- Get a list of the URLs for all of the Librarians available
- Request search results from all the Librarians when a query is received
- Aggregate search results based on DocID
- Sort the results in descending order of relevance score
- Form and return the JSON payload as per the Swagger API definition
Now that we understand the rationale behind having multiple instances of Librarian, and how we are going to handle queries based on this new configuration, we can apply these changes to concierge/api/query.go.