[ TOC ]
It is a C library implementation based on swish-e-2.0 beta4, but many of the functions have been rewritten in order to get a thread safe library.
[ TOC ]
At this moment (Aug 2000) there are 6 functions defined:
This functions opens and reads header info of the index files included in IndexFiles
myhandle=SwishOpen("file1.idx"); |
Returns NULL on error
This function closes and frees the memory of a Swish handle
This function executes a search for a handle
Input data:
handle: value returned by SwishOpen words: the search string structure: At this moment always one ( it will implement the -t option of swish-e) properties: Optional. Properties to display. Use NULL if no properties sortspec: Sort specs for the results. Use NULL if sort by rank |
Returns the number of hits or a negative value on error
results=SwishSearch(handle,"tit=test",1,"tit","date desc"); There is a new feature here that it is not included in swish-e-2.0: You can specify several sorting properties including a combination of descending and ascending fields. |
field1 asc field2 desc |
This function returns next result. It must be executed after SwishSearch. Returns NULL on error or when no more results are available
This function puts the results pointer in the nth reult Returns n if operation goes OK or a negative number on error.
This function returns the last error
XXX add
[ TOC ]
Please report bug reports to the swish-e discussion group. Feel also free to improve or enhance this feature.
[ TOC ]
[ TOC ]
$Id: SWISH-LIBRARY.pod,v 1.1 2001/01/27 20:33:06 whmoseley Exp $
. [ TOC ]