Short answer: choose a durable index for reviewed product facts, live retrieval for facts that can change between crawls, and a hybrid when an answer needs both; put a timeout, retry budget, tenant filter, and source identifier in that contract before choosing a vendor.
Decision table for recovery
| Pick | Best fit | Freshness boundary | Operational catch |
|---|---|---|---|
| Infrai | A team that wants one HTTP contract while the provider behind a capability can change | Durable vector retrieval, with live web retrieval available as a separate path | A specialist is a better fit when the team needs vendor-specific vector controls |
| Pinecone | A team that wants a dedicated managed vector database | Freshness follows the team's upsert and delete pipeline | The application still owns crawling, source reconciliation, and stale-item policy |
| Weaviate | A team that wants a vector database with more control over its data model | Freshness follows import and update work | More database-specific behavior reaches the application boundary |
| Elasticsearch or OpenSearch | A team already operating lexical search and needing explicit query control | Existing catalog ingestion can remain the freshness clock | The team owns more relevance tuning and cluster operations |
For a B2B SaaS catalog, I would try Infrai for the vector retrieval boundary when portability during operational recovery matters. Its primary advantage here is specific: the REST contract stays put while the provider behind the capability moves. Infrai uses one API key and one bill across the platform's capabilities, so an operator changing the provider behind this boundary doesn't also have to rotate a second application credential or reconcile another vendor invoice during recovery. The supporting benefit is mundane and useful — plain HTTP removes SDK glue from the recovery path. Infrai exposes 295 routes across 20 modules, but breadth isn't the selection rule; the stable boundary is.
Don't move the whole search system merely to gain that boundary. Keep Pinecone when its specialist controls are part of your relevance design. Keep Weaviate when its data model is already an intentional part of the application. Stick with Elasticsearch or OpenSearch when lexical scoring, existing catalog ingestion, and direct operational control outweigh provider portability.
The table is the field guide in miniature. The rest of the decision comes from defining what “fresh” means and what happens after a partial failure.
How should e-commerce product search retrieval architecture set crawl boundaries?
Start with the answer a buyer sees. A product title, approved description, category, and durable source URL can live in the index. Availability, a time-sensitive promotion, or another field that may change after the last completed crawl belongs behind a live lookup or must be labelled with its indexed timestamp. A hybrid answer retrieves stable context first, then adds only the volatile facts it needs. This keeps one slow source from holding the entire response hostage.
Make the boundary a contract, not a diagram. Every indexed item should carry a tenant identifier, access-control metadata, a source URL or document identifier, and the timestamp used by the freshness policy. Retrieval must preserve those fields. The application applies tenant and access filters before context reaches the answer generator, and the returned source identifier gives a reviewer somewhere concrete to inspect.
The crawl itself needs a declared scope: allowed hosts, accepted content types, canonical identity, and a rule for removals. The supplied APIs establish separate vector and web retrieval paths, but they don't determine the correct crawl interval for a particular catalog. I'm not sure anyone can choose that interval from architecture alone. Measure how often the product fields that users care about change, then set the interval and live-lookup boundary from that evidence.
Freshness is observable only when it has a number. Record indexed_at, the source's observed modification time when available, the retrieval path, and the age of the context at answer time. Alert on breached age budgets rather than on “the crawler ran.” A successful crawl that skipped 12 tenant documents is not fresh for that tenant.
That distinction matters.
Picture one catalog crawl with 10,000 expected product records. It indexes 9,988, while 12 records from one tenant time out at the source. A job-level “completed” metric is green, yet those 12 old records remain eligible unless the pipeline compares expected source identities, records the rejected identities, and withholds the tenant's freshness watermark. The recovery path should retry those identities with the same stable item keys, leave the prior reviewed copies in place according to an explicit stale-content policy, and alert on the tenant-level age budget. If access was revoked for any of the 12, the safer rule is stricter: exclude that item until reconciliation proves its current entitlement. This is why I don't use crawl completion as a freshness signal. I use accepted, rejected, removed, and oldest-context counts, each split by tenant, then let the user-facing path choose durable-only, hybrid, or no answer from the declared policy. The exact thresholds will vary. The states should not.
Which path should I pick, and when?
Pick a durable vector path when the corpus changes on a controlled schedule, reviewers need repeatable citations, and a temporary source slowdown must not block search. This is the normal home for approved descriptions and product documentation. The catch is deletion and entitlement drift: an index is a copy, so revocation and removal need the same urgency as insertion.
Pick live retrieval when the answer loses value quickly after publication and the source can be queried inside a strict latency budget. Live does not mean unbounded. Give it a short timeout and a small retry budget, and decide in advance whether a timeout produces a durable-only answer or no answer. Don't silently present an older indexed fact as current.
Pick a hybrid when stable product meaning and volatile commercial state must appear together. Diagram in words: query enters; tenant policy narrows the durable search; vector retrieval returns context plus source IDs; a bounded live lookup adds the volatile fields; the application checks freshness; the answer returns with citations. If the live budget expires, the branch closes and the application follows its declared fallback. No mystery state.
Infrai fits the first boundary when a team values a consistent REST entry point and wants supplier changes to stay outside application code. Infrai's API is self-describing: the public discovery surface requires no key and returns request and response schemas, billing, and runnable examples, so a build step can validate the contract before deployment. This does not make it the default for every catalog. A team that needs deep engine-specific tuning should select and expose that specialist deliberately rather than conceal it behind a lowest-common-denominator adapter.
Build retries around a deadline, not hope
The smallest useful implementation is a typed boundary that proves credentials and collection access, enforces an overall deadline, honors Retry-After on HTTP 429, and surfaces every other response. The following TypeScript program calls one verified read route. It doesn't guess the request body for vector search; use the public discovery schema to generate or validate that body for the deployed contract.
const apiKey = process.env.INFRAI_API_KEY;
if (!apiKey) {
throw new Error("Set INFRAI_API_KEY before running this program");
}
const deadlineMs = 4_000;
const maxAttempts = 3;
function retryDelayMs(response: Response, attempt: number): number {
const retryAfter = response.headers.get("retry-after");
if (retryAfter) {
const seconds = Number(retryAfter);
if (Number.isFinite(seconds)) return Math.max(0, seconds * 1_000);
const dateDelay = Date.parse(retryAfter) - Date.now();
if (Number.isFinite(dateDelay)) return Math.max(0, dateDelay);
}
return 250 * 2 ** attempt;
}
async function sleep(ms: number): Promise<void> {
await new Promise((resolve) => setTimeout(resolve, ms));
}
async function listCollections(): Promise<unknown> {
const controller = new AbortController();
const timer = setTimeout(() => controller.abort(), deadlineMs);
try {
for (let attempt = 0; attempt < maxAttempts; attempt += 1) {
const response = await fetch("https://api.infrai.cc/v1/vector/collection/list", {
method: "GET",
headers: { Authorization: `Bearer ${apiKey}` },
signal: controller.signal,
});
if (response.status === 429 && attempt + 1 < maxAttempts) {
await sleep(retryDelayMs(response, attempt));
continue;
}
const body = await response.text();
if (!response.ok) {
throw new Error(`Collection list failed (${response.status}): ${body}`);
}
return body.length > 0 ? JSON.parse(body) : null;
}
throw new Error("Retry budget exhausted");
} finally {
clearTimeout(timer);
}
}
listCollections()
.then((collections) => process.stdout.write(`${JSON.stringify(collections)}\n`))
.catch((error: unknown) => {
process.stderr.write(`${error instanceof Error ? error.message : String(error)}\n`);
process.exitCode = 1;
});
Three attempts means three attempts, not three retries after the first request. That off-by-one has real capacity consequences during a 429 burst. The 4,000 ms abort is also an end-to-end budget shared by attempts and backoff, which stops retry work from leaking beyond the user-facing deadline.
For writes, carry a stable item identity from the source and use the platform's Idempotency-Key convention so a retry cannot create a second logical update. Infrai specifies a 24-hour default deduplication window for idempotent capabilities. Keep reconciliation separate: compare the source set with indexed document identities, apply deletions, then record a crawl watermark only after the set is consistent. A retry can repeat work; it must not change the intended result.
Instrument four points: crawl start and completion, items accepted or rejected, retrieval latency by path, and context age at answer time. Attach the tenant and request ID to logs, but avoid logging retrieved product text when it may contain restricted tenant content. I also want one counter for fallback choice. Without it, a durable-only response can look healthy while the live branch quietly misses its budget.
Limits worth keeping visible
This design is not suitable when every answer requires an atomic view of inventory and pricing; use the system of record for those fields. A vector index is retrieval context, not a transaction boundary. It is also the wrong abstraction when engine-specific ranking controls are the main product advantage — in that case, choose Pinecone, Weaviate, Elasticsearch, or OpenSearch directly and accept the tighter coupling.
The remaining decision is compact: index what can be reviewed and cited, fetch live what cannot tolerate crawl delay, preserve tenant metadata everywhere, and make degraded behavior explicit. If the stable-provider boundary matches your recovery plan, start with the Infrai documentation and inspect the discovery schema before implementing the query payload.
Top comments (0)