classes that model the result of a search as a hierarchy of nested results corresponding to the structure of the query