OceanBase Plugin Development Kit
OceanBase Plugin Development Kit
载入中...
搜索中...
未找到
ObPluginFtParser

struct  ObPluginFTParser
 fulltext parser descriptor interface for domain index splitting a document into many tokenizations.return the version of this parser 更多...
 

宏定义

#define OBP_FTPARSER_INTERFACE_VERSION   OBP_MAKE_VERSION(0, 1, 0)
 full text parser interface version
 
#define OBP_FTPARSER_INTERFACE_VERSION_0_2_0   OBP_MAKE_VERSION(0, 2, 0)
 
#define OBP_FTPARSER_INTERFACE_VERSION_CURRENT   OBP_FTPARSER_INTERFACE_VERSION_0_2_0
 current full text parser interface version
 
#define OBP_REGISTER_FTPARSER(param, name, descriptor, description)
 

类型定义

typedef ObPluginDatum ObPluginFTParserParamPtr
 full text parser add word flag
 

枚举

enum  ObPluginFTPaserAddWordFlag {
  OBP_FTPARSER_AWF_NONE = 0LL ,
  OBP_FTPARSER_AWF_MIN_MAX_WORD = 1LL << 0 ,
  OBP_FTPARSER_AWF_STOPWORD = 1LL << 1 ,
  OBP_FTPARSER_AWF_CASEDOWN = 1LL << 2 ,
  OBP_FTPARSER_AWF_GROUPBY_WORD = 1LL << 3
}
 

函数

OBP_PUBLIC_API uint64_t obp_ftparser_parser_version (ObPluginFTParserParamPtr param)
 
OBP_PUBLIC_API const char * obp_ftparser_fulltext (ObPluginFTParserParamPtr param)
 the fulltext is the text you should split it to tokens @NOTE the fulltext is not terminated by '\0'.
 
OBP_PUBLIC_API int64_t obp_ftparser_fulltext_length (ObPluginFTParserParamPtr param)
 get the charsetinfo object from param
 
OBP_PUBLIC_API ObPluginCharsetInfoPtr obp_ftparser_charset_info (ObPluginFTParserParamPtr param)
 
OBP_PUBLIC_API ObPluginParamPtr obp_ftparser_plugin_param (ObPluginFTParserParamPtr param)
 get the plugin parameter through fulltext parser parameter
 
OBP_PUBLIC_API ObPluginDatum obp_ftparser_user_data (ObPluginFTParserParamPtr param)
 The user data of fulltext parameter
 
OBP_PUBLIC_API void obp_ftparser_set_user_data (ObPluginFTParserParamPtr param, ObPluginDatum user_data)
 set user data
 
OBP_PUBLIC_API int obp_register_plugin_ftparser (ObPluginParamPtr param, const char *name, ObPluginVersion version, ObPluginFTParser *ftparser, int64_t ftparser_sizeof, const char *description)
 register fulltext parser plugin @NOTE use OBP_REGISTER_FTPARSER instead
 

详细描述

宏定义说明

◆ OBP_FTPARSER_INTERFACE_VERSION

#define OBP_FTPARSER_INTERFACE_VERSION   OBP_MAKE_VERSION(0, 1, 0)

full text parser interface version

注解
this is the minimum version. You should add new version if you add new routines.

在文件 ob_plugin_ftparser.h28 行定义.

◆ OBP_FTPARSER_INTERFACE_VERSION_0_2_0

#define OBP_FTPARSER_INTERFACE_VERSION_0_2_0   OBP_MAKE_VERSION(0, 2, 0)

在文件 ob_plugin_ftparser.h30 行定义.

◆ OBP_FTPARSER_INTERFACE_VERSION_CURRENT

#define OBP_FTPARSER_INTERFACE_VERSION_CURRENT   OBP_FTPARSER_INTERFACE_VERSION_0_2_0

current full text parser interface version

注解
you should change this value if you add some new routines in interface struct. full text parser parameter

在文件 ob_plugin_ftparser.h36 行定义.

◆ OBP_REGISTER_FTPARSER

#define OBP_REGISTER_FTPARSER ( param,
name,
descriptor,
description )
值:
name, \
&descriptor, \
(int64_t)sizeof(descriptor), \
description);
#define OBP_FTPARSER_INTERFACE_VERSION_CURRENT
current full text parser interface version
OBP_PUBLIC_API int obp_register_plugin_ftparser(ObPluginParamPtr param, const char *name, ObPluginVersion version, ObPluginFTParser *ftparser, int64_t ftparser_sizeof, const char *description)
register fulltext parser plugin @NOTE use OBP_REGISTER_FTPARSER instead

在文件 ob_plugin_ftparser.h147 行定义.

类型定义说明

◆ ObPluginFTParserParamPtr

full text parser add word flag

在文件 ob_plugin_ftparser.h43 行定义.

枚举类型说明

◆ ObPluginFTPaserAddWordFlag

枚举值
OBP_FTPARSER_AWF_NONE 

filter words that are less than a minimum or greater than a maximum word length.

OBP_FTPARSER_AWF_MIN_MAX_WORD 

filter by sotp word table.

OBP_FTPARSER_AWF_STOPWORD 

convert characters from uppercase to lowercase.

OBP_FTPARSER_AWF_CASEDOWN 

distinct and word aggregation

OBP_FTPARSER_AWF_GROUPBY_WORD 

在文件 ob_plugin_ftparser.h46 行定义.

函数说明

◆ obp_ftparser_charset_info()

◆ obp_ftparser_fulltext()

OBP_PUBLIC_API const char * obp_ftparser_fulltext ( ObPluginFTParserParamPtr param)

the fulltext is the text you should split it to tokens @NOTE the fulltext is not terminated by '\0'.

You can use obp_ftparser_fulltext_length to get the length. the length of fulltext

◆ obp_ftparser_fulltext_length()

OBP_PUBLIC_API int64_t obp_ftparser_fulltext_length ( ObPluginFTParserParamPtr param)

get the charsetinfo object from param

◆ obp_ftparser_parser_version()

OBP_PUBLIC_API uint64_t obp_ftparser_parser_version ( ObPluginFTParserParamPtr param)

◆ obp_ftparser_plugin_param()

OBP_PUBLIC_API ObPluginParamPtr obp_ftparser_plugin_param ( ObPluginFTParserParamPtr param)

get the plugin parameter through fulltext parser parameter

◆ obp_ftparser_set_user_data()

OBP_PUBLIC_API void obp_ftparser_set_user_data ( ObPluginFTParserParamPtr param,
ObPluginDatum user_data )

set user data

You can retrieve user data by obp_ftparser_user_data

◆ obp_ftparser_user_data()

OBP_PUBLIC_API ObPluginDatum obp_ftparser_user_data ( ObPluginFTParserParamPtr param)

The user data of fulltext parameter

User data is a pointer (void *) so that you can set it to anything you want.

◆ obp_register_plugin_ftparser()

OBP_PUBLIC_API int obp_register_plugin_ftparser ( ObPluginParamPtr param,
const char * name,
ObPluginVersion version,
ObPluginFTParser * ftparser,
int64_t ftparser_sizeof,
const char * description )

register fulltext parser plugin @NOTE use OBP_REGISTER_FTPARSER instead

参数
paramthe param of ObPluginParam which is a passed in param in plugin::init
namefulltext parser name, 64 characters maximum
ftparserthe ftparser struct. The object will be copied.
ftparser_sizeofthe size of ftparser
descriptionthe description of the ftparser