Changelog - 2026-11-03
TypesenseConnector.findDocument returns null for a missing document
New FeatureIn one line. Use findDocument when a missing document is an answer, not an error.
What changed
findDocument({ collection, id })returns the document ornull. A missing document (the engine's 404) isnull; every other failure throws asgetDocumentdoes (a 400 is a 400, a 5xx or a transport failure is the 503).- A missing collection is
nulltoo. The engine answers a 404 for both, so a mistyped collection name looks like a missing document. document.findis the same call on the document facade of the connector.getDocumentis unchanged. It still throws404 core.search_engine.not_found.
Who is affected
- Code that wrapped
getDocumentin a try/catch only to read a 404 as "not there". It can callfindDocument. - Everyone else. No action needed.
Details
typescript
const product = await connector.findDocument<IProduct>({ collection: 'products', id: '42' });
if (product === null) {
// not indexed yet
}