The documents stored as files will be indexed based on their words/tokens using hashing functions. This is done in order to make it easier to retrieve the required documents.
Searching will be done using trees, and depend in g upon th eefficiency an d complexity of the algorithm we will use AVL trees or balanced binary search trees. In order to allow efficient searching, for every word a list of documents where it will occur will be stored. The queries may contain simple Boolean operators, that is AND/OR, which act in a similar manner with the well-known analogous logical operators. For each such query, the document that satisfies that query will be displayed.
For instance, a query:
Keyword1 AND Keyword2 -- should retrieve all documents that contain both these keywords (elements).
Keyword1 OR Keyword2 -- instead will retrieve documents that contain either one of the two keywords