The query resolver – the REST API endpoint

The main aim of /api/query is to find the set of search terms in the inverted index and return a list of document IDs in decreasing order of relevance. Let's look at what we mean by "querying search terms" and "relevance".

Query resolution can be defined as the following set of consecutive tasks:

  1. For each of the search terms, we would like to retrieve all available books in inverted index form.
  2. Next, we would like to store the occurrence counts for all the words within each individual book in a simple look up table (map).
  3. Once we have a map with books and their respective counts, we can convert the look up table into an array of ordered document IDs and their respective scores.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset