1. A computer-implemented method of ranking items returned in response to a user input, comprising: generating a sample with a feature vector for each of the results to be ranked; applying the samples to a dependency structure having a plurality of nodes, to split the samples at each node, based on a feature and feature value at each node, until each of the samples is associated with a leaf node in the dependency structure; and ranking the samples based on a relative position of the leaf nodes, in the dependency structure, with which the samples are associated.