Anytime Ranking on Document-Ordered Indexes

Joel Mackenzie, Matthias Petri, Alistair MoffatarXiv 2021

TL;DR

This paper introduces a novel way to perform "anytime" ranking on standard document-ordered inverted indexes by reorganizing them into topically coherent ranges. By prioritizing these ranges using a simple score estimator and employing reactive termination policies, the authors achieve superior search effectiveness under strict tail-latency constraints (SLAs) compared to traditional impact-ordered approaches.

What Problem Does This Paper Address?

Modern web search engines face a dual challenge: they must process massive document collections efficiently while adhering to strict Service Level Agreements (SLAs) that mandate fast response times (e.g., 95% of queries must finish within 50ms).

Standard document-ordered indexes are the industry workhorse because they support flexible query types and efficient dynamic pruning (skipping irrelevant documents). However, they struggle with "anytime" processing—the ability to stop a search at any moment and return the best results found so far. Because high-scoring documents are scattered throughout the index, stopping early in a document-ordered traversal often misses the best results entirely.

The alternative, impact-ordered indexes, are designed for anytime ranking but are less flexible and harder to update. The authors seek to bring the best of both worlds: the flexibility of document-ordered indexes with the robust anytime performance required for modern, low-latency production environments.

Methods

The authors propose a three-step framework to enable anytime ranking on document-ordered indexes:

  1. Index Reorganization: Instead of one giant list, documents are partitioned into topical "clusters" or ranges. Within each range, documents are further reordered using recursive graph bisection to improve locality. Overview of building the cluster-skipping inverted index
  2. Range Selection (BoundSum): To decide which ranges to process first, the authors use a heuristic called BoundSum. They store the maximum possible score contribution ($U_{t,i}$) for every term $t$ in every range $i$. At query time, they sum these bounds for the query terms and process ranges in decreasing order of their total potential score.
  3. Termination Policies: To meet SLAs, the system needs to know when to quit. The authors move beyond simple time-checks to Predictive and Reactive policies. The Reactive policy uses a feedback loop: if a query exceeds the SLA, the system becomes more conservative (increasing a safety parameter $\alpha$) for subsequent queries; if it finishes well within time, it relaxes, allowing more processing for the next query.
Fig. 2. An overview of the process for building the cluster skipping inverted index at a given index server node. The shard of the global corpus being handled at this single ISN is segmented into a number of topical clusters, each of which is then indexed individually. Next, each cluster index is reordered internally, to improve its internal coherence; and finally, the cluster indexes are concatenated together to form the ISN index, structured as a sequence of document ranges, with each range corresponding to one of the clusters. The same process is repeated at each ISN.

Datasets

The researchers evaluated their approach using two large-scale public web crawls:

  • Gov2: ~25 million documents.
  • ClueWeb09B: ~50 million documents. Evaluation was performed using 5,000 random queries from the TREC Million Query Track, biased toward common query lengths (1–5+ terms).

Key Insights and Ideas

  • Sequential is Better than Parallel: Unlike "selective search," which processes shards in parallel via a broker, this approach processes ranges sequentially on a single node. This allows the system to update its "best-score-so-far" threshold ($ \theta $) rapidly, enabling more aggressive dynamic pruning in later ranges. Intuition behind range-prioritized processing vs. normal pruning
  • Reordering as an Anytime Enabler: While document reordering is usually discussed in the context of index compression, here it serves a critical role in clustering "fertile" documents together, making early termination much safer.
  • Simplicity Wins: The BoundSum heuristic is extremely lightweight compared to complex machine-learned models used in selective search. Because it is so fast to compute, the time saved can be spent actually scoring documents, leading to a better overall trade-off.
Fig. 1. Dynamic pruning: (a) on an unordered document collection, with high-scoring documents scattered throughout; (b) on a document collection in which the documents are topically-clustered into three coherent ranges; and (c) on the same document collection, but with range selection applied. In parts (b) and (c) it is assumed the documents of interest were primarily located in range 2. Those two parts of the figure are discussed in Section 3.

Key Results

  • Efficiency Gains: Document reordering alone provided a 1.6x to 1.7x speedup in query processing by improving cache locality and reducing row initializations.
  • Superior Anytime Performance: The proposed range-based Document-at-a-Time (DaaT) approach outperformed the state-of-the-art impact-ordered system (JASS) across the majority of the response-time spectrum.
  • SLA Compliance: The Reactive termination policy successfully met aggressive tail-latency targets (e.g., $P_{99} \le 10ms$) while maintaining high retrieval effectiveness (measured by Rank-Biased Overlap).
  • Scalability: The system demonstrated near-linear scaling on multi-core hardware, maintaining strict SLAs even under high concurrent query loads.

Limitations and Future Work

  • Topical Incoherence: The approach struggles with "problematic" queries where relevant documents are spread thinly across many different topical ranges. In these cases, early termination can still lead to significant effectiveness loss.
  • Fixed Range Sizes: The authors noted that meeting extremely tight SLAs (e.g., 5ms) might require reconfiguring the index into even smaller, more granular ranges.
  • Future Directions: The authors suggest exploring index synopses (small samples of the index) to further improve latency prediction and investigating how to strategically "sacrifice" specific queries to better meet overall system-wide SLAs.

Summary updated

BibTeX
@misc{mackenzie2021anytime,
  author = {Joel Mackenzie and Matthias Petri and Alistair Moffat},
  title = {{Anytime Ranking on Document-Ordered Indexes}},
  year = {2021},
  eprint = {2104.08976},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2104.08976},
}
Figure