Back to The Trade Desk questions
CodingSoftware Engineer

Domain-Diverse Pagination

Frequency: Reported


Rows are sorted by score and contain domain_id, result_id, and score.

  1. Build the first page while preferring unique domains.
  2. Paginate all results, deferring repeated domains when possible.
  3. When a unique-domain pass cannot fill a page, emit the remaining rows in score order as the final page.

The source did not preserve page size, tie behavior, input format, or examples.