Dictionary structures for a document retrieval system