January 2020
Intermediate to advanced
640 pages
16h 56m
English
As the first step in our analysis of the indexer component, we will start by describing the document model that the Indexer implementations will index and search:
type Document struct { LinkID uuid.UUID URL string Title string Content string IndexedAt time.Time PageRank float64 }
All the documents must include a non-empty attribute called LinkID. This attribute is a UUID value that connects a document with a link that's obtained from the link graph. In addition to the link ID, each document also stores the URL of the indexed document and allows us to not only display it as part of the search results but to also implement more advanced search patterns in future (for example, constraint searches to a particular ...