DTSEARCHRETRIEVE(3)
π DtSearchRetrieve β library call, bestie π
πΈ NAME πΈ
DtSearchRetrieve β Return clear text of documents from DtSearch databases. That's the whole name vibe: it's literally here to hand you the clear text of docs from DtSearch databases. π
β¨ SYNOPSIS β¨
Include it exactly like this, no cap:
#include &<Dt/Search.h>
int DtSearchRetrieve(
char *dbname,
DB_ADDR dba,
char **cleartext,
long *clearlen,
int *fzkeyi);
π¦ DESCRIPTION π¦
Okay so here's the tea: DtSearchRetrieve retrieves the uncompressed document text of a specified DtSearch document listed in the DtSrResult list from a previous call to DtSearchQuery. It will be successful only in an AusText type database where the documents are stored directly in a database repository. Periodt. π«Ά
π ARGUMENTS π
dbnameβ Specifies which database the document is stored in. It can be any one of the database name strings returned fromDtSearchInitorDtSearchReinit. IfdbnameisNULL, the first database name string is used. So bestie, no dbname? Default to the first one. β¨dbaβ The database address of the desired record from theDtSrResult.dbafield in a search results list. It's giving VIP address for the exact record you want. π«cleartextβ Specifies a pointer where a zero terminated C string containing the document text will be stored. The string is allocated storage that will be freed by the next call to this function. That's the whole lifecycle, iykyk. π§clearlenβ Specifies a pointer where the length of thecleartextstring will be stored. Length check, but make it pointer. πfzkeyiβ This is a reserved argument. It should always beNULL. Not me looking at a reserved slot β literally alwaysNULL, bestie. π«
π₯ RETURN VALUE π₯
DtSearchRetrieve returns DtSrOK as well as the cleartext string, when document retrieval is completely successful. Vibe check: passed, slay. β
It returns DtSrNOTAVAIL if the document text is not available from the database for whatever reason. No text? No vibes. π
Any other return code signifies failure and user messages on the MessageList explain why. So check the MessageList, bestie β it's giving receipts. π§Ύ
Any API function can also return DtSrREINIT and the return codes for fatal engine errors at any time. Highkey important, fr fr. β οΈ
π SEE ALSO π
Go read these too, bestie:
π okay bye bestie β this was DtSearchRetrieve from the library call manual, and the footer is literally just that library-call vibe: no extra source/version or date gossip here. Mwah! π
π¦ where this page comes from
- nixos 26.05: cde 2.5.3
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms