As an example, consider two documents D1 = (0.5, 0.8, 0.3) and D2 =
(0.9, 0.4, 0.2) indexed by three terms, where the numbers represent term weights.
Given the query Q = (1.5, 1.0, 0) indexed by the same terms, the cosine measures
for the two documents are: