English

Optimal Top-k Document Retrieval

Data Structures and Algorithms 2013-08-02 v2 Information Retrieval

Abstract

Let D\mathcal{D} be a collection of DD documents, which are strings over an alphabet of size σ\sigma, of total length nn. We describe a data structure that uses linear space and and reports kk most relevant documents that contain a query pattern PP, which is a string of length pp, in time O(p/logσn+k)O(p/\log_\sigma n+k), which is optimal in the RAM model in the general case where lgD=Θ(logn)\lg D = \Theta(\log n), and involves a novel RAM-optimal suffix tree search. Our construction supports an ample set of important relevance measures... [clip] When lgD=o(logn)\lg D = o(\log n), we show how to reduce the space of the data structure from O(nlogn)O(n\log n) to O(n(logσ+logD+loglogn))O(n(\log\sigma+\log D+\log\log n)) bits... [clip] We also consider the dynamic scenario, where documents can be inserted and deleted from the collection. We obtain linear space and query time O(p(loglogn)2/logσn+logn+kloglogk)O(p(\log\log n)^2/\log_\sigma n+\log n + k\log\log k), whereas insertions and deletions require O(log1+ϵn)O(\log^{1+\epsilon} n) time per symbol, for any constant ϵ>0\epsilon>0. Finally, we consider an extended static scenario where an extra parameter par(P,d)par(P,d) is defined, and the query must retrieve only documents dd such that par(P,d)[τ1,τ2]par(P,d)\in [\tau_1,\tau_2], where this range is specified at query time. We solve these queries using linear space and O(p/logσn+log1+ϵn+klogϵn)O(p/\log_\sigma n + \log^{1+\epsilon} n + k\log^\epsilon n) time, for any constant ϵ>0\epsilon>0. Our technique is to translate these top-kk problems into multidimensional geometric search problems. As an additional bonus, we describe some improvements to those problems.

Keywords

Cite

@article{arxiv.1307.6789,
  title  = {Optimal Top-k Document Retrieval},
  author = {Gonzalo Navarro and Yakov Nekrich},
  journal= {arXiv preprint arXiv:1307.6789},
  year   = {2013}
}
R2 v1 2026-06-22T00:57:53.599Z