|
NAMEafgetresultmd - get metadata associated with search results SYNOPSIS#include af.h int afgetresultmd(const Afresult *result, int resultn, Afresultmd *resultmd); DESCRIPTIONThe afgetresultmd function retrieves additional metadata about results returned from afsearch(3). The argument result specifies the array of results. The argument resultn specifies the number of elements in result. The argument resultmd specifies an array with the same number of elements as result, to be filled in by this function. RETURN VALUEThis function returns 0 if it exited normally. If an error occurred, it returns -1 and aferrno is set. If the function exited normally, the array resultmd is filled in. Each element of resultmd consists of the following: typedef struct {
Uint4 parent;
char docpath[AFPATHSIZE];
off_t begin;
off_t end;
} Afresultmd;
The parent is the document identifier of this document's parent. When this is used, it is usually a container, for example, an outer XML element. If it is unused, it is set to 0. The docpath is the path name of the file containing the document. The begin and end values are offsets delimiting the starting and ending points of the document within the file docpath. The end offset points one character past the end of the document. ERRORSThis function returns only "core" errors.
|