1. A computer-readable storage device containing instructions for controlling a computer system to generate a distance metric for pairs of categories of a hierarchical taxonomy for documents, by a method comprising: providing for each pair of categories in the taxonomy a path length between the categories, the taxonomy being represented by nodes and edges between nodes, each node representing a category, the edges representing a hierarchy of the categories, wherein a path length for a pair of categories is the number of edges in the shortest path between nodes representing the categories, each pair of categories referring to each possible combination of two different categories; providing for each pair of categories in the taxonomy a term space distance indicating distance between term feature vectors representing terms of documents within the categories, each term feature vector for a document including frequencies for keywords in the document; generating a distance metric between pairs of categories based on minimization of the differences between path lengths and distances derived from new feature vector representations of the categories and minimization of the differences between term space distances between term feature vectors and distances derived from the new feature vector representations; classifying documents into categories of the hierarchical taxonomy using the generated distance metric; organizing search results of documents into categories based on the classification of the documents into categories; and presenting to a user the search results as organized into the categories wherein the term space distances are F-norm distances.