ctdbSetFTIOption
Declaration
CTDBRET ctdbDECL ctdbSetFTIOption(CTHANDLE Handle, UCOUNT option, pTEXT pvalue, ULONG lvalue)
Description:
Allows several Full-Text Search values to be set depending on the option.
Parameters:
In function ctdbSetFTIOption, either lvalue or pvalue needs to be set depending on the option.
Update Options
CTDB_FTI_OPTION_UPD
Set lvalue to one of the following to specify when to perform FTS Index updates:
Mode |
Code |
Description |
---|---|---|
CTDB_FTI_OPTION_UPD_ASYNC |
0x0000 |
Perform FTI updates in background (default) |
CTDB_FTI_OPTION_UPD_IMMEDIATE |
0x0001 |
Perform FTI updates immediately |
CTDB_FTI_OPTION_IGNORE_EXISTING
|
0x0100 |
Disable the loading of existing records to create an FTI without loading existing records This setting is not persisted after creation. It is possible to perform a ctdbAlterTable(...CTDB_ALTER_FTI) indicating to not load existing record on rebuild (i.e., empty the indices it rebuilds) by explicitly calling ctdbSetFTIOption (... ,CTDB_FTI_OPTION_IGNORE_EXISTING) on the proper indices. |
Tokenizer Options
CTDB_FTI_OPTION_TOKENSIZE
Set lvalue to the maximum token size.
CTDB_FTI_OPTION_TOKENIZER
Set lvalue to one of the following:
Mode |
Code |
Description |
---|---|---|
CTDB_FTI_TOKENIZER_CUSTOM |
0 |
Use a user-defined custom tokenizer - see Full-Text Search Custom Tokenizer |
CTDB_FTI_TOKENIZER_SIMPLE |
1 |
Use the standard, simple tokenizer, which uses white space to delimit tokens. Default |
CTDB_FTI_TOKENIZER_PORTER |
2 |
Use the Porter Tokenizer, which uses "stemming" to reduce words to a common root so grammatically similar words can be matched. |
CTDB_FTI_TOKENIZER_ICU |
3 |
Use the ICU Unicode Tokenizer - see Full-Text Search ICU Tokenizer |
ICU Tokenizer
CTDB_FTI_OPTION_ICULANG
Set pvalue to a string identifying the language for Unicode collation based on ICU library capabilities to use with the ICU tokenizer. See Full-Text Search ICU Tokenizer.
CTDB_FTI_OPTION_ICUOPTION
Set lvalue to an ICU option using c-tree extended segment modes for ICU-based indexes configuration. See Full-Text Search ICU Tokenizer.
Custom Tokenizer
CTDB_FTI_OPTION_CUSTLIB
Set pvalue to the name of the library to load implementing a custom tokenizer. See Full-Text Search Custom Tokenizer.
CTDB_FTI_OPTION_CUSTPARAM
Set pvalue to a string that will be passed to the custom tokenizer init function with custom details. See Full-Text Search Custom Tokenizer.
Dictionary Domain Options
This option is used internally to define the scope of the word dictionary used for full-text search. It currently has no exposed API uses.
Dictionary Domain |
Code |
Description |
---|---|---|
CTFTI_DOMAIN_TABLE |
0x0000 |
Scope is the table. |
CTFTI_DOMAIN_DATABASE |
0x0001 |
Scope is the database the table belongs. |
CTFTI_DOMAIN_SERVER |
0x0002 |
Scope is the server. |
Returns:
ctdbSetFTIOption() returns CTDBRET_OK on success, or one of the following errors on failure:
See Also