Skip to content

docs: document the crawl.order configuration parameter - #514

Open
marevol wants to merge 3 commits into
masterfrom
docs/crawl-order
Open

docs: document the crawl.order configuration parameter#514
marevol wants to merge 3 commits into
masterfrom
docs/crawl-order

Conversation

@marevol

@marevol marevol commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

crawl.order has shipped for some time but was never documented in any language. It now names a UrlQueueOrder component, so this documents it in the 15.9 tree for all seven languages.

Added to the "Basic Configuration Items" section of config/crawler-basic.rst, between "Crawl Interval" and "File Size Configuration":

  • a table of the five built-in component names and the order each produces
  • an example using the full parameter name, config.crawl.order=depthFirstUrlQueueOrder
  • the caveat that depth-first is bounded by the polling batch rather than being a strict traversal, including the case that surprises people: when the whole queue fits in one batch, every order proceeds level by level
  • what separates the two weight-based orders. Weight is already the default order's primary sort key, so installing a UrlQueueWeigher changes the fetch order without setting config.crawl.order at all; weightFirstUrlQueueOrder differs only between entries of equal weight, and earns its place on a large weighted backlog where only the weight should decide what comes next
  • warning-and-fallback behavior for an unresolvable name
  • a note that the older sequential and random values still resolve

The full parameter name matters: ParameterUtil strips the config. prefix before building the map, so crawl.order=... is ignored with no diagnostic at all — verified on a live crawl.

Only the 15.9 tree is touched; versions.json marks it as development.

Verified with standalone docutils rather than a Sphinx build — conf/conf.py:228 contains an invalid \u escape in a non-raw string, so the module raises SyntaxError on Python 3 before any RST is parsed. That is a pre-existing problem unrelated to this change and worth a separate fix, since it currently blocks local HTML builds for every language. The parse was run before and after the edit in all seven languages; the message counts are unchanged.

crawl.order has shipped since the sequential/random switch was added but was
never documented in any language. It now names a UrlQueueOrder component, so
the page lists the built-in names, records that depth-first is bounded by the
polling batch rather than a strict traversal, and notes that the old values
still resolve.
Crawling-config Configuration Parameters are dispatched by a "config."
prefix that is stripped before use, so the documented key must be
config.crawl.order, not crawl.order. An unprefixed crawl.order= line
matches no prefix and is silently dropped, leaving the crawl in the
default order with no warning. Fix the code samples, prose, and the
legacy-values note (config.crawl.order=sequential /
config.crawl.order=random) across all seven language trees.

While those files were open:

- Add a sentence noting that weights are uniform unless a custom
  UrlQueueWeigher is installed, so weightFirstUrlQueueOrder has no
  effect by default and sequentialUrlQueueOrder is, in practice,
  ordered by discovery order.
- Add :widths: to the new Crawl Order list-table to match the other
  tables on the page.
…tch case

"has no effect by default" described the symptom without the cause and left the
order looking pointless. The two weight-based orders differ only in what happens
between entries of equal weight, and the fact that gets missed is that weight is
already the default order's primary sort key - installing a UrlQueueWeigher
changes the fetch order with no config.crawl.order setting at all. Out of the box
every entry ties at the same weight, which is why the default reads as discovery
order and why weightFirstUrlQueueOrder has nothing to sort by. It earns its place
on a large weighted backlog where only the weight should decide what comes next.

The depth-first caveat also gains the case that surprises people: when the whole
queue fits in one polling batch, every order proceeds level by level.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant