MySQL 8.0.40
Source Code Documentation
fts0plugin.cc File Reference

Full Text Search plugin support. More...

#include "fts0plugin.h"
#include "ft_global.h"
#include "fts0ast.h"
#include "fts0tokenize.h"
#include "mysql/plugin.h"

Functions

static int fts_default_parser_init (MYSQL_FTPARSER_PARAM *param)
 FTS default parser init. More...
 
static int fts_default_parser_deinit (MYSQL_FTPARSER_PARAM *param)
 FTS default parser deinit. More...
 
static int fts_default_parser_parse (MYSQL_FTPARSER_PARAM *param)
 FTS default parser parse from ft_static.c in MYISAM. More...
 
static fts_ast_node_tfts_query_get_oper_node (MYSQL_FTPARSER_BOOLEAN_INFO *info, fts_ast_state_t *state)
 Get a operator node from token boolean info. More...
 
static int fts_query_add_word_for_parser (MYSQL_FTPARSER_PARAM *param, char *word, int word_len, MYSQL_FTPARSER_BOOLEAN_INFO *info)
 FTS plugin parser 'myql_add_word' callback function for query parse. More...
 
static int fts_parse_query_internal (MYSQL_FTPARSER_PARAM *param, char *query, int len)
 FTS plugin parser 'myql_parser' callback function for query parse. More...
 
int fts_parse_by_parser (bool mode, uchar *query_str, ulint query_len, st_mysql_ftparser *parser, fts_ast_state_t *state)
 fts parse query by plugin parser. More...
 

Variables

struct st_mysql_ftparser fts_default_parser
 

Detailed Description

Full Text Search plugin support.

Created 2013/06/04 Shaohua Wang

Function Documentation

◆ fts_default_parser_deinit()

static int fts_default_parser_deinit ( MYSQL_FTPARSER_PARAM param)
static

FTS default parser deinit.

Returns
0
Parameters
paramin: plugin parser param

◆ fts_default_parser_init()

static int fts_default_parser_init ( MYSQL_FTPARSER_PARAM param)
static

FTS default parser init.

Returns
0
Parameters
paramin: plugin parser param

◆ fts_default_parser_parse()

static int fts_default_parser_parse ( MYSQL_FTPARSER_PARAM param)
static

FTS default parser parse from ft_static.c in MYISAM.

Returns
0 if parse successfully, or return non-zero
Parameters
paramin: plugin parser param

◆ fts_parse_by_parser()

int fts_parse_by_parser ( bool  mode,
uchar query_str,
ulint  query_len,
st_mysql_ftparser parser,
fts_ast_state_t state 
)

fts parse query by plugin parser.

Returns
0 if parse successfully, or return non-zero.
Parameters
modein: parse boolean mode
query_strin: query string
query_lenin: query string length
parserin: fts plugin parser
statein/out: parser state

◆ fts_parse_query_internal()

static int fts_parse_query_internal ( MYSQL_FTPARSER_PARAM param,
char *  query,
int  len 
)
static

FTS plugin parser 'myql_parser' callback function for query parse.

Refer to 'MYSQL_FTPARSER_PARAM' for more detail.

Returns
0 if parse successfully
Parameters
paramin: parser param
queryin: query string
lenin: query length

◆ fts_query_add_word_for_parser()

static int fts_query_add_word_for_parser ( MYSQL_FTPARSER_PARAM param,
char *  word,
int  word_len,
MYSQL_FTPARSER_BOOLEAN_INFO info 
)
static

FTS plugin parser 'myql_add_word' callback function for query parse.

Refer to 'MYSQL_FTPARSER_PARAM' for more detail. Note: a. Parse logic refers to 'ftb_query_add_word' from ft_boolean_search.c in MYISAM; b. Parse node or tree refers to fts0pars.y.

Returns
0 if add successfully, or return non-zero.
Parameters
paramin: parser param
wordin: token
word_lenin: token length
infoin: token info

◆ fts_query_get_oper_node()

static fts_ast_node_t * fts_query_get_oper_node ( MYSQL_FTPARSER_BOOLEAN_INFO info,
fts_ast_state_t state 
)
static

Get a operator node from token boolean info.

Returns
node
Parameters
infoin: token info
statein/out: query parse state

Variable Documentation

◆ fts_default_parser

struct st_mysql_ftparser fts_default_parser
Initial value:
= {
static int fts_default_parser_deinit(MYSQL_FTPARSER_PARAM *param)
FTS default parser deinit.
Definition: fts0plugin.cc:51
static int fts_default_parser_parse(MYSQL_FTPARSER_PARAM *param)
FTS default parser parse from ft_static.c in MYISAM.
Definition: fts0plugin.cc:60
static int fts_default_parser_init(MYSQL_FTPARSER_PARAM *param)
FTS default parser init.
Definition: fts0plugin.cc:42
#define MYSQL_FTPARSER_INTERFACE_VERSION
Definition: plugin.h:655