For the text indexer component use case, we need to be able to perform the following set of operations:
- Add a document to the index or reindex an existing document when its content changes. This operation will normally be invoked by the crawler component.
- Perform a lookup for a document by its ID.
- Perform a full-text query and obtain an iterable list of results. The frontend component for our project will invoke this operation when the user clicks the search button and consume the returned iterator to present a paginated list of results to the end user.
- Update the PageRank score for a particular document. This operation will be invoked by the PageRank calculator component when the PageRank score for a particular link needs to be updated.