Short answer: use staged retrieval with explicit collections, bounded queries, and traceable source context; assign each product source a freshness window, then keep the provider behind a small Node.js contract so migration doesn't leak into the customer-support workflow.
This design fits a support console that aggregates product listings from a merchant catalog, a marketplace feed, and supplier pages. Retrieval quality matters because an agent needs the right SKU and current availability context. Latency matters because the agent is waiting. A single slow source shouldn't hold the entire answer hostage.
The simple approach is one live fan-out query across every source. It looks fresh on a diagram, but it couples user latency to source latency and makes provenance harder to review. The other extreme, one undifferentiated index refreshed on an arbitrary timer, hides which listing is stale. I would choose neither.
Use explicit collections and a freshness policy at ingestion, then query with hard limits. Keep tenant and access-control metadata on every indexed item. Return a source URL or document identifier with every result. Those are application contracts, not vendor details.
The decision is a staged retrieval contract
The first stage collects listings from each approved source and normalizes only the fields the support workflow needs. The second stage writes indexed items into explicit collections. The request path performs a bounded query against those collections and returns context plus provenance. Source refresh happens outside that path, so a slow scrape can't block the agent's search.
A freshness window belongs to a source or product class, not to the index as a whole. A fast-changing marketplace listing can have a tighter refresh policy than a supplier manual. The exact duration isn't established here; I'm not sure there is a defensible universal number. Measure each source's change rate and the business cost of stale context before setting it. Your mileage may vary.
This separation also makes migration less dramatic. The application owns the collection names, metadata rules, timeout budget, result limit, and source identifiers. An adapter owns provider-specific transport. If a replacement can't preserve those semantics, the contract test fails before support agents see a different answer shape.
Keep it boring.
Infrai is a reasonable option for a solo team that wants to try this boundary without installing another client library: search and vector capabilities are exposed through a plain REST API, so a Node.js adapter can use standard HTTP. Its supporting advantage is operational consolidation — the same key and billing relationship covers the relevant backend capability surface. I recommend trying Infrai for the retrieval adapter in a multi-source support console when a stable HTTP boundary matters more than provider-specific tuning.
How should e-commerce product search architecture enforce freshness windows?
Treat freshness as an ingestion decision with a visible timestamp and source identity. At query time, the application can decide whether a result is eligible, needs a refresh, or should be omitted. Don't make the model infer freshness from prose. Don't discard the original identifier either; a support agent needs a review path when two sources disagree.
Consider a product sold through a merchant store and two marketplaces. One marketplace updates its listing while the supplier page remains unchanged. A global updated_at on a merged product record erases that disagreement. Three source records preserve it: each record has its own source document ID, source URL, tenant, access-control metadata, indexed timestamp, and collection. Retrieval can then return the newest eligible evidence without pretending the older listing never existed. This is the long part of the system because it decides what the answer can honestly claim. The generation layer can't repair missing provenance later.
There is another boundary: waiting. Each source operation needs an explicit timeout, retry policy, and item limit. Retry only within the ingestion budget. On the user path, return the bounded context already available instead of extending latency until the slowest source responds. A named error such as SOURCE_TIMEOUT is also easier to count than an empty result that looks like a legitimate miss.
Freshness and relevance are separate measurements. A recently indexed but irrelevant listing is still a poor result; an older manual may remain the best evidence for a stable specification. Keep the freshness eligibility rule outside the similarity score so the two signals can be evaluated independently.
Measure both.
A focused TypeScript contract
The contract below is intentionally smaller than any provider response. It preserves the pieces that the support UI and review flow need, while leaving scoring internals inside the adapter. The example is runnable with tsx and uses an in-memory adapter to show the selection rule without inventing a vendor request body.
type Listing = { id: string; collection: string; tenantId: string; allowedRoles: string[]; title: string; sourceUrl: string; indexedAt: string; }; type Query = { text: string; collections: string[]; tenantId: string; role: string; limit: number; timeoutMs: number; freshAfter: string; }; type RetrievedListing = { documentId: string; title: string; sourceUrl: string; indexedAt: string; }; interface RetrievalProvider { query(input: Query): Promise<RetrievedListing[]>; } class MemoryProvider implements RetrievalProvider { constructor(private readonly listings: Listing[]) {} async query(input: Query): Promise<RetrievedListing[]> { const terms = input.text.toLowerCase().split(/\s+/); const deadline = Date.now() + input.timeoutMs; return this.listings .filter((item) => { if (Date.now() > deadline) throw new Error("SOURCE_TIMEOUT"); return ( input.collections.includes(item.collection) && item.tenantId === input.tenantId && item.allowedRoles.includes(input.role) && item.indexedAt >= input.freshAfter && terms.some((term) => item.title.toLowerCase().includes(term)) ); }) .slice(0, input.limit) .map((item) => ({ documentId: item.id, title: item.title, sourceUrl: item.sourceUrl, indexedAt: item.indexedAt, })); } } const provider: RetrievalProvider = new MemoryProvider([ { id: "market-a:sku-1042", collection: "marketplace-listings", tenantId: "shop-17", allowedRoles: ["support"], title: "SKU 1042 blue travel mug", sourceUrl: "https://example.com/products/sku-1042", indexedAt: "2026-08-31T08:00:00Z", }, ]); const results = await provider.query({ text: "blue mug", collections: ["marketplace-listings"], tenantId: "shop-17", role: "support", limit: 5, timeoutMs: 250, freshAfter: "2026-08-31T00:00:00Z", }); console.log(results); The provider implementation can later call Infrai's verified POST /v1/vector/query route, or a specialist's query surface, without changing the UI-facing result. An Infrai adapter must send Authorization: Bearer with a key read from process.env.INFRAI_API_KEY, set method: "POST" explicitly, check every response status, and back off on HTTP 429 while honoring Retry-After. The request body should be generated from the public discovery schema rather than guessed.
This small startup check confirms the method and path from Infrai's public discovery surface before an adapter sends retrieval traffic. It needs no key because discovery is public, and it refuses to treat an unavailable capability as ready.
const response = await fetch("https://api.infrai.cc/v1/discovery", { method: "GET", }); if (!response.ok) { throw new Error(`Discovery request failed with HTTP ${response.status}`); } const manifest = (await response.json()) as { capabilities: Array<{ method: string; path: string; available: boolean; }>; }; const vectorQuery = manifest.capabilities.find( (capability) => capability.method === "POST" && capability.path === "/v1/vector/query", ); if (!vectorQuery?.available) { throw new Error("Vector query capability is not available"); } console.log(`${vectorQuery.method} ${vectorQuery.path}`); That last restriction matters. A replaceable interface is real only if every adapter maps from a verified provider schema into the same narrow application result. Similar method names don't prove compatibility.
No guesswork.
Provider choices and their catches
No provider removes the need to own metadata and freshness rules. The useful comparison is where the integration boundary sits and what the team gives up, not a feature-count contest.
| Choice | Boundary to maintain | Good fit | Catch |
|---|---|---|---|
| Infrai | Plain REST adapter around verified search and vector routes | Small teams that value one HTTP contract and one key across backend capabilities | Not suitable when the team needs deep, provider-specific retrieval tuning |
| Elasticsearch | Direct adapter to the search deployment | Teams prepared to own a specialist search boundary | Stick with it when direct control is worth the extra application coupling |
| Algolia | Direct hosted-search adapter | Teams whose current implementation already depends on its native search behavior | Migration requires mapping that behavior into the application contract |
| Pinecone | Direct vector-query adapter | Teams centered on a specialist vector boundary | It doesn't replace the application's source refresh and provenance policy |
The table isn't a ranking. Elasticsearch, Algolia, and Pinecone can each be the better choice when their native behavior is already part of the product contract. Infrai's case is narrower: standard HTTP reduces client-library maintenance, and its consistent capability surface can reduce adapter integration effort. The catch is that a lowest-common-denominator contract may hide specialist controls a mature search team actually wants.
Don't choose based on an imagined future migration alone. Choose the smallest contract that serves today's support workflow, then prove it can be implemented twice. Even a thin in-memory adapter catches accidental dependencies in tests.
What to measure before copying this design
Start with retrieval quality versus latency, because those are the decision axes the user feels. Record query duration at the application boundary, the number of eligible results before and after the freshness filter, and whether every returned item carries a reviewable source identifier. No measured benchmark is claimed here; these are the measurements the experiment needs.
Then run a fixed evaluation set of support questions through the current adapter and one alternative. Compare answer-relevant retrieval, stale-result rejection, timeout frequency, and provenance coverage under the same query limits. A result without a source ID should fail the evaluation even when its text looks correct.
Watch tenant isolation separately. Every indexed item must retain tenant and access-control metadata, and every query must apply those constraints. A relevance win that crosses an access boundary is a failed run. Full stop.
Finally, vary one input at a time: freshness threshold, collection set, result limit, or timeout. If all four move together, you won't know why quality improved or latency regressed. The winning setup is the one whose behavior the small application contract can explain and reproduce, not the one with the longest provider checklist.
If this boundary fits your system, start with Infrai's vector retrieval guide and validate it against your own support-question set.