skip to content

When should an ingestion connector sync a wiki, shared drive or ticket tracker by full crawl, change feed or webhook, and why keep a crawl?

level: middleimportance: must knowfreq 58%

answer

  1. what each source's API can promise
  2. completeness versus cost versus latency
  3. a notification is a hint, not the record
  4. the slow layer that trusts nobody

basics

~20 s

Use a source's change feed where it offers one, webhooks as a low-latency trigger to fetch, and a scheduled crawl where neither exists; keep a periodic reconciliation crawl because feeds expire, webhooks drop and some changes never appear in either.

solid answer

~50 s

I choose per source by what its API can promise. A **full crawl** lists and fetches everything: complete and simple, but slow and expensive in requests, so it suits small sources or ones without a change API. A **change feed** ("give me changes since this sync token") is the workhorse for many shared drives and some wikis: cheap and incremental, but its sync token can expire and many feeds skip permission, move or restore events. A **webhook** arrives seconds after an edit, which is great for latency, but deliveries get dropped, arrive out of order and often carry only an ID, so I treat one as a trigger to fetch the current version, never as the record. Many ticket trackers offer an updated-since search, which is a poll. Whatever the primary path, a slower **reconciliation crawl** stays, because it compares the whole source with the index instead of trusting that every change was announced.

go deeper

for a junior

Name the three methods and one weakness of each: a crawl is slow, a change feed's sync token can expire, a webhook can be dropped. Say why a deleted page never shows up in a modified-since search.

for a middle

Explain the choice per source from its API, why a webhook should trigger a fetch of the current version, and why that makes processing idempotent and order-insensitive.

for a senior

Design the layers for one real source: trigger, poll, reconciliation crawl, and which blind spot each covers. Name the changes that no incremental method reports, such as permission-only edits and lost connector scope.

for a principal

Treat the reconciliation crawl's cadence as a cost against how long a silent miss may last for each source, and make that trade explicit with the source owners rather than defaulting to one schedule.

## What a connector has to learn from a source An **ingestion connector** is the part of a retrieval-augmented generation (RAG) pipeline that reads documents out of the systems people actually write in (a team wiki, a shared drive, a ticket tracker) and hands them on to parsing, chunking and embedding. On day one it only has to read everything once. From day two on it has to learn three kinds of news from every source: - what was **created or edited**; - what was **deleted, moved or archived**; - whose **access changed**, even when the content did not. Each source's API decides how cheaply each kind of news can be had. That is why the sync method is chosen **per source**, not once for the whole pipeline, and why a connector that is perfect for one source silently misses things on another. ## The three ways to hear about change | Method | How it works | Strength | What it can silently miss | |---|---|---|---| | **Full crawl** | List every document, fetch it or its metadata, compare with the index | Complete; needs no change API; notices absence | Costs many requests and hours or days on a large source | | **Change feed** | Ask for changes since a stored **sync token**; store the new token returned | Cheap, incremental, usually ordered | Token expiry after a retention window; event types the feed does not emit | | **Webhook** | The source sends an HTTP request to your endpoint shortly after an edit | Low latency, no polling cost | Dropped deliveries, out-of-order arrival, lapsed subscriptions, thin payloads | A weaker cousin of the change feed is **modified-since polling**: searching for items updated after a timestamp. It needs no token, but a deleted item matches no search, and any change that does not bump the timestamp (many permission edits, some moves) is invisible to it. ## Choosing per source The shapes below are common, not universal; check what each source's API actually offers. - **Shared drives** often expose a real change feed with sync tokens. It becomes the primary path, with webhooks, where offered, used only as a "poll now" nudge. - **Team wikis** vary widely. Some offer change notifications or an audit stream; many offer only a search by last-modified time, so a modified-since poll plus a regular crawl is the realistic design. - **Ticket trackers** usually have a strong updated-since search and webhooks on ticket events. Webhooks trigger a fetch; the poll catches what they miss. - **Small sources** of a few thousand documents can simply be crawled on a schedule; the moving parts of a feed are not worth it. The rule behind all four: the chosen method must report every kind of news you need, or a second method must cover the gap. ## Why a webhook is a trigger, not the record A webhook payload is a snapshot of one moment, sent by a system that may deliver events late or out of order. If two edits land a second apart and their deliveries arrive reversed, indexing the payloads writes the older version last. Many sources also send only the document ID, or a truncated body. Fetching the **current version** from the source on every delivery makes handling **idempotent** (processing the same delivery twice writes the same result) and insensitive to order. ## Why the reconciliation crawl never goes away - **Sync tokens expire.** A connector down longer than the source keeps change history has to start over from a full crawl. - **Webhooks drop.** Senders retry for a while and then give up; subscriptions lapse. - **Feeds have blind spots.** Permission-only edits, moves between folders, restores from trash and bulk changes made by admin tools often never appear. - **Connectors have bugs.** A parser that skipped one document type for a month is invisible to every incremental method. - **Scope drifts.** If the connector's service account loses access to a folder, incremental methods just stop reporting it. A **reconciliation crawl** compares the source's full listing with the index on a slower cadence, often nightly or weekly, and reads metadata first so it fetches content only where something differs. Deciding which indexed documents to remove once it finds a mismatch is the re-indexing step's job, not the connector's. ## Layering the methods 1. A webhook arrives: enqueue the document ID, then fetch its current version. 2. A change-feed or modified-since poll runs on a short interval and catches what webhooks missed. 3. A reconciliation crawl runs on a long interval and catches what both missed. Because every layer fetches the current version, overlap between layers is harmless. The interval of the slowest layer bounds how long a change that every faster layer missed can stay hidden from the index, as long as that crawl compares whatever the change touched: content, location and, where it reads them, permissions.

  • Why should a webhook handler fetch the document rather than index the payload it was sent?
    Payloads can be partial, and deliveries can arrive late or out of order, so indexing them can write an older version over a newer one. Fetching the current version on every delivery makes the handler idempotent and order-insensitive: two deliveries for the same document write the same result.
  • How do you decide how often the reconciliation crawl runs?
    Its interval is the worst case for any change the faster layers missed, so set it from how long a silent miss is tolerable for that source, then check the request cost. Reading metadata first and fetching content only on mismatch usually makes a nightly or weekly pass affordable even on large sources.

A shop hears about stock three ways: a doorbell when a delivery arrives, a supplier's ledger of everything sent since your last check, and a stocktake. The doorbell is fast but silent if you were out; the ledger is only kept for so long; the stocktake is slow but trusts nobody's notes, so the shop keeps doing it.

  • Webhooks are real-time, so no polling or crawl is needed.
  • A change feed reports every kind of change, including permission edits and moves.
  • Index the webhook payload directly as the document's new version.
  • A modified-since poll will also pick up deleted documents.
  • Crawl every source in full every night; the request quota is the source's problem.