1. A method for preparing an ontology for searching, the method comprising: compressing the ontology such that one individual in each set of semantically equivalent individuals remains in a compressed ontology; determining semantically restricted relations among individuals in the compressed ontology; determining semantically equivalent concepts in the compressed ontology; determining semantically restricted relations among concepts in the ontology; and constructing a semantically restricted relation graph based at least on the semantically restricted relations among individuals and the semantically restricted relations among concepts, wherein a query is answered using the semantically restricted relation graph.