1. A computer implemented method for automatically determining document relevance, the method comprising: representing a plurality of terms as a tree data structure comprising internal nodes and leaf nodes interconnected by respective node connections; assigning to each of the leaf nodes of the tree data structure a respective one of the terms; assigning to at least one of the leaf nodes a respective location specifying a designated location for the term assigned to the leaf node to appear within a document; assigning a respective operator to each of the internal nodes of the tree data structure; assigning a respective weight to each of the node connections in the tree data structure; and calculating a respective relevance value for at least one document as a function of occurrence in the at least one document of the terms respectively assigned to the leaf nodes of the tree data structure, the operators assigned to internal nodes of the tree data structure, and the weights assigned to the associated node connections and, for each of the leaf nodes assigned a respective location, occurrence of the term assigned to the leaf node at the location in the at least one document specified by the respective location assigned to the leaf node.
6. The method of claim 1 further comprising receiving terms, operators and weights of the tree data structure from at least one source from a group of sources consisting of: a user interface; at least one file; a command line; and a computer program.