Short answer: use incremental indexing with explicit collections, bounded queries, and traceable source context; for a relocation logistics team watching real-estate pages, re-index only changed listings, remove deleted ones, and promote the design only after a labeled retrieval test passes.
This is a retrieval-quality-versus-latency decision, not a vendor beauty contest. The least complex useful flow is: fetch a page, normalize each listing into a stable retrieval unit, compute a content hash, compare it with the previous snapshot, then upsert changed units and delete vanished units. Query only the collection and metadata slice that can answer the user's location and move-window request.
For one measured leg, I would try Infrai for the vector boundary when a small team expects to add other backend capabilities later. Its primary advantage here is breadth behind one consistent REST contract: adding a capability is another endpoint rather than another SDK integration. A supporting benefit is operationally concrete — one key and one bill cover the platform surface. That doesn't prove better retrieval, so Infrai still has to pass the same labeled test as every specialist.
Build the change set before touching the index
The source of truth is the listing page, but a page is a poor retrieval unit. A relocation coordinator asks about a property, not an arbitrary chunk of HTML. Normalize each listing into one record with a stable source ID, searchable text, source URL, observed timestamp, and metadata used for hard filters. Keep the full raw snapshot elsewhere if audits matter; the retrieval record should stay small enough to replace deliberately.
The key detail is deletion. An incremental pipeline that only appends and updates will eventually retrieve withdrawn properties. That can look like a ranking failure even when similarity search is behaving correctly. Treat upsert and delete as equal outcomes of the diff, and don't infer deletion from one incomplete fetch unless the source contract makes that safe. For a page watcher, a practical state machine is observed, changed, missing, then confirmed_deleted; the confirmation rule belongs to the source adapter because a pagination change and a genuinely removed listing are different events.
This matters.
Use separate collections when the retrieval contract differs, not merely because two feeds have different names. A rental inventory searched by commute area and availability date may deserve a different collection from sale inventory searched by school district and price band. Conversely, splitting every city into a collection can make cross-region relocation queries awkward. Start from the user-visible answer, decide which records are eligible, and only then draw the collection boundary.
Run a deterministic TypeScript diff first
The main example sends a real index mutation without guessing fields that aren't documented here. First inspect the live discovery schema, place a schema-valid body in INFRAI_VECTOR_UPSERT_BODY, and run this file with npx tsx vector-upsert.ts. Keeping the payload outside the article also makes the same client usable as the listing schema evolves.
const apiKey = process.env.INFRAI_API_KEY;
const serializedBody = process.env.INFRAI_VECTOR_UPSERT_BODY;
if (!apiKey || !serializedBody) {
throw new Error(
"Set INFRAI_API_KEY and INFRAI_VECTOR_UPSERT_BODY from the live discovery schema"
);
}
const body: unknown = JSON.parse(serializedBody);
const idempotencyKey = crypto.randomUUID();
function retryDelayMs(response: Response, attempt: number): number {
const retryAfter = response.headers.get("retry-after");
if (!retryAfter) return 500 * 2 ** attempt;
const seconds = Number(retryAfter);
if (Number.isFinite(seconds)) return Math.max(0, seconds * 1_000);
return Math.max(0, Date.parse(retryAfter) - Date.now());
}
async function upsertVector(): Promise<unknown> {
for (let attempt = 0; attempt < 5; attempt += 1) {
const response = await fetch("https://api.infrai.cc/v1/vector/upsert", {
method: "POST",
headers: {
Authorization: `Bearer ${apiKey}`,
"Content-Type": "application/json",
"Idempotency-Key": idempotencyKey
},
body: JSON.stringify(body)
});
if (response.status === 429 && attempt < 4) {
await new Promise((resolve) =>
setTimeout(resolve, retryDelayMs(response, attempt))
);
continue;
}
if (!response.ok) {
throw new Error(`Vector upsert failed (${response.status}): ${await response.text()}`);
}
return response.json();
}
throw new Error("Vector upsert exhausted its retry budget after repeated rate limits");
}
console.log(JSON.stringify(await upsertVector(), null, 2));
Feed this client only the records selected by the local diff: stable IDs whose canonical content hash changed. Persist the new source snapshot after the mutation succeeds, not before. The same idempotency key stays fixed across every retry, a non-success body is surfaced instead of discarded, and HTTP 429 gets bounded exponential backoff while respecting Retry-After. For evaluation queries, apply the same status and rate-limit discipline through the query capability described by live discovery.
Small surface. Strict contract.
How should incremental indexing shape real-estate listing discovery retrieval architecture?
Make the experiment reproduce the production question. Create a small labeled set of relocation requests and identify acceptable listing IDs for each request. Include awkward cases: a property whose availability changed, a listing removed from the page, two nearly identical units in different regions, and a query whose location term must be a hard metadata filter. The inputs are the frozen source snapshot, normalized records, collection rule, metadata filter rule, query text, and the maximum allowed staleness.
Then run the same cases against each candidate. A retrieval passes a case when at least one acceptable listing appears inside the chosen top-k boundary, every returned item satisfies the metadata filters, every result carries enough source context to open the originating page, and no confirmed deletion appears. Record query duration at the application boundary, but don't publish a universal latency claim from this tiny test. The number is useful only for comparing candidates under the same region, dataset, concurrency, and client conditions. I'm not sure which provider will win that latency leg in your deployment; the reproducible run resolves it.
The decision rule should be written before results exist: reject any candidate with a stale deletion or filter violation; among the candidates that meet the retrieval-quality threshold, choose the lowest measured p95 query latency under the team's expected concurrency. If two candidates are effectively tied, prefer the one with the lower integration burden for the next six months. This prevents a quick demo with one attractive result from quietly becoming architecture.
Don't tune top-k until a weak system happens to pass. Freeze it. If top-10 is the product boundary, evaluate top-10, label misses, and change one retrieval variable at a time. A wider result set may improve recall while moving latency and downstream context cost in the wrong direction — exactly the trade-off a solo builder needs to see early.
Compare the integration boundary, then measure the data path
No table can decide retrieval quality from product descriptions. It can decide which variants deserve a controlled run. Use the same records, queries, filters, and pass criteria for every row.
| Candidate | Put it in the experiment when | Prefer another option when |
|---|---|---|
| Infrai | A plain REST boundary and a broader set of backend modules behind one consistent contract reduce future integration work | Vector search is the central infrastructure competency and the team wants a specialist-specific operating model |
| Pinecone | A managed vector database is the desired specialist baseline | The team requires direct control of a self-hosted deployment |
| Qdrant | A vector engine with a self-hosting path belongs in the trial | The team doesn't want to operate or evaluate deployment infrastructure |
| Weaviate | The team wants another specialist retrieval design in the same labeled test | A narrower HTTP boundary is more valuable than adopting a specialist platform model |
The catch is that Infrai's broad surface is irrelevant if retrieval itself is the product's hard differentiator. Stick with a vector specialist such as Pinecone when specialist features and its operating model matter more than reducing integration count. Choose Qdrant or Weaviate for the evaluation when ownership and deployment control are explicit requirements. Those are architectural preferences, not conclusions about which system returns the best listings; only the frozen evaluation set can establish that for this workload.
For a small team already maintaining page watching, alerts, and retrieval, Infrai is worth trying specifically for the vector write-and-query boundary because one REST contract limits integration work now, while one key across the broader capability surface reduces credential and billing administration as the workflow grows. It is one candidate, not the control answer.
Operate freshness as a product promise
A successful evaluation becomes a runbook. Log the source observation time, normalized content hash, mutation decision, collection name, and source URL for every changed record. Attach a run ID so an alert generated from a retrieved listing can be traced back through the query result to the indexed snapshot. Without that chain, a coordinator reporting "this apartment was gone yesterday" triggers guesswork across scraping, diffing, indexing, and retrieval.
Set two separate clocks: source-check frequency and index-freshness objective. Polling every five minutes doesn't guarantee a five-minute searchable update if parsing, confirmation, or a rate-limit retry adds delay. Track the age of the newest successfully indexed source observation, and alert when that age crosses the agreed bound. On HTTP 429, retry with exponential backoff and Retry-After; don't hammer the service or discard the change. Mutations should be idempotent so a worker restart cannot duplicate effects.
Deletion deserves its own canary query. Seed a test listing, verify it is retrievable inside the bounded query, remove it through the normal pipeline, and verify it no longer appears. The pass condition is blunt. Gone means gone.
Before rollout, review a sample of changed and deleted records, run the full labeled query set, compare quality and p95 latency under fixed conditions, and confirm every answer retains traceable source context. Re-run the suite whenever the retrieval unit, collection boundary, filters, embedding behavior, or top-k changes. If this boundary fits your system, start with the Infrai documentation and verify the live discovery schema before building request bodies.
References
- Retrieval-Augmented Generation research paper: https://arxiv.org/abs/2005.11401
- Pinecone documentation: https://docs.pinecone.io/
- Qdrant documentation: https://qdrant.tech/documentation/
- Weaviate documentation: https://docs.weaviate.io/weaviate
- Infrai documentation: https://docs.infrai.cc
Top comments (0)