Exercise 88. Items versus Sets | A. Only StringQueries go to the catalog; others are built out of the results of queries. B. We definitely want to move to a Set type. Again, the trick will be a good preparation after the adds are done. We could prebuild a map from words (i.e., the StringQuery's query string) to sets of items; this would turn simple queries into a lookup instead of a scan. C. Interpreter ”think of matchesIn() as the evaluation method, and the catalog as the context. The computation " bubbles up" the results of the query. |