For information about the functions used for Full-Text Search (FTS) and Full-Text Indexing (FTI), see the Full-Text Search documentation.
ctdbAddFTI
Add a new Full-Text Search index to a table.
ctdbAddFTIField
Add a new field to a Full-Text Search index.
ctdbAddFTIFieldByName
Add a new field to an FTS index.
ctdbAllocFTI
Allocate memory for a new Full-Text Index handle.
ctdbCheckFTIBackgroundLoad
Check the status of the background index loader for the Full-Text Index (FTI).
See ctdbCheckFTIBackgroundLoad
ctdbCheckIndexBackgroundLoad
Check the status of the background index loader for the specified table.
Declaration
CTDBRET ctdbDECL ctdbCheckIndexBackgroundLoad(CTHANDLE Handle, pBGLDINF status)
Description
This function can be used to monitor the status of the index loading on tables. See CTINDEX_BCKLOAD.
- Handle [IN] - Table handle.
- status [OUT] - status information.
Background key loading can improve performance when adding new indexes. A new background loading mode can be OR-d in with an existing key mode from a ctdbAddIndex (ctdbAddIndex, ctdbAddIndex)() call indicating initial index loading must be done in the background.
Once ctdbAddIndex() is called, ctdbAlterTable() initiates the changes to the file and begins the load once the new index is successfully created.
Check the status of index loading with the new ctdbCheckIndexBackgroundLoad() (ctdbCheckIndexBackgroundLoad, ctdbCheckIndexBackgroundLoad) API, useful for monitoring index loading on tables.
Returns
Returns CTDBRET_OK on success.
ctdbDelFTI
Delete a table Full-Text Search configuration.
See ctdbDelFTI
ctdbDetachSession
Detaches a FairCom DB API session handle from an existing c-tree connection.
DECLARATION
CTDBRET ctdbDECL ctdbDetachSession(CTHANDLE Handle);
DESCRIPTION
ctdbDetachSession() detaches a FairCom DB API session handle. The c-tree ISAM or low-level un-initialization is not called, but the session handle control structures are released and re- initialized. Handle is a session handle allocated by ctdbAllocSesison().
RETURN
| Value | Symbolic Constant | Explanation |
|---|---|---|
| 0 | NO_ERROR | No error occurred. |
See Appendix A for a complete listing of valid c-tree Plus error values.
EXAMPLE
/* logon to c-tree using ISAM function */
INTISAMX(10, 32, 32, 10, (USERPRF_NTKEY | USERPRF_CLRCHK));
/* attach session to server handle */
if (ctdbAttachSession(hSession, NO) != CTDBRET_OK)
printf("ctdbAttachSession failed\n");
/*
... do something useful ...
*/
/* detach from session */
if (ctdbDetachSession(hSession) != CTDBRET_OK)
printf("ctdbDetachSession failed\n");
/* perform an ISAM logout */
CLISAM();
SEE ALSO
ctdbAttachSession()
ctdbDisconnectAll
Disconnect all databases.
Declaration
CTDBRET ctdbDisconnectAll(CTHANDLE Handle)
Description
ctdbDisconnectAll() disconnects all connected databases. Once a database has been disconnected from a database handle, that database is no longer considered "active."
- Handle [in] the session handle.
Use ctdbConnect() to connect a database to a session via a database handle.
Use ctdbDisconnect() to disconnect just one database.
A database created with ctdbCreateDatabase() is automatically connected to the present session.
Returns
ctdbDisconnect() returns CTDBRET_OK on success, or the c-tree error code on failure.
Example
ctdbCloseAll(hDatabase);
ctdbDisconnectAll(hSession);
ctdbLogout(hSession);
ctdbFreeTable(hTable);
ctdbFreeDatabase(hDatabase);
ctdbFreeSession(hSession);
See also
ctdbAllocSession(), ctdbConnect(), ctdbDisconnect(), ctdbCreateDatabase()
ctdbFreeFTI
Release all resources associated with a Full-Text Search handle.
ctdbFTSearchOff
Disable and free an existing Full-Text Search.
ctdbFTSearchOn
Set up a new Full-Text Search.
ctdbGetFTI
Retrieve the Full-Text Search handle.
ctdbGetFTIByName
Retrieve the index handle given the index name.
ctdbGetFTIByUID
Retrieve an FTI by its unique ID (the Full Text Index counterpart of ctdbGetIndexByUID).
ctdbGetFTIField
Retrieve the field handle of the field indicated by FieldNumber.
ctdbGetFTIFieldCount
Retrieve the number of segments associated with this index.
ctdbGetFTIFieldMode
Return the field mode specified when adding the field to the FTI.
ctdbGetFTIHandle
Return the Full-Text Search handle or NULL on failure.
ctdbGetFTIName
Retrieve the name of the Full-Text Index (FTI).
ctdbGetFTINbr
Get the number of an FTI in the FTI list (the Full Text Index counterpart of ctdbGetIndexNbr).
ctdbGetFTINbrByName
Retrieve the index number given the index name.
ctdbGetFTIStatus
Retrieve the status of the index handle.
ctdbGetTableFTICount
Retrieve the number of FTS indexes associated with the table.
ctdbIsFTSearchOn
Indicate if a Full-Text Search is active or not.
ctdbSetDefaultFTI
Set the number of a new default FTI.
ctdbSetFTICndxExpr
Set the conditional expression for this Full Text Index.
ctdbSetFTIOption
Allows several Full-Text Search values to be set depending on the option.
ctdbStartFTIBackgroundLoad
Starts a background index loader for the Full-Text Index (FTI).