MySQL 9.1.0
Source Code Documentation
|
Some definitions for full-text indices. More...
#include <math.h>
#include <mysql/plugin.h>
#include <cstdint>
#include "my_tree.h"
#include "mysql/strings/m_ctype.h"
#include "storage/myisam/fulltext.h"
#include "storage/myisam/queues.h"
Go to the source code of this file.
Classes | |
struct | FT_WORD |
FTS query token. More... | |
struct | _st_ft_seg_iterator |
Macros | |
#define | FT_MAX_WORD_LEN_FOR_SORT 31 |
#define | FTPARSER_MEMROOT_ALLOC_SIZE 65536 |
#define | LWS_FOR_QUERY LWS_TF |
#define | LWS_IN_USE LWS_LOG |
#define | PRENORM_IN_USE PRENORM_AVG |
#define | NORM_IN_USE NORM_PIVOT |
#define | GWS_IN_USE GWS_PROB |
#define | LWS_TF (count) |
#define | LWS_BINARY (count > 0) |
#define | LWS_SQUARE (count * count) |
#define | LWS_LOG (count ? (log((double)count) + 1) : 0) |
#define | PRENORM_NONE (p->weight) |
#define | PRENORM_MAX (p->weight / docstat.max) |
#define | PRENORM_AUG (0.4 + 0.6 * p->weight / docstat.max) |
#define | PRENORM_AVG (p->weight / docstat.sum * docstat.uniq) |
#define | PRENORM_AVGLOG ((1 + log(p->weight)) / (1 + log(docstat.sum / docstat.uniq))) |
#define | NORM_NONE (1) |
#define | NORM_SUM (docstat.nsum) |
#define | NORM_COS (sqrt(docstat.nsum2)) |
#define | PIVOT_VAL (0.0115) |
#define | NORM_PIVOT (1 + PIVOT_VAL * docstat.uniq) |
#define | GWS_NORM (1 / sqrt(sum2)) |
#define | GWS_GFIDF (sum / doc_cnt) |
#define | GWS_IDF log(aio->info->state->records / doc_cnt) |
#define | GWS_IDF1 log((double)aio->info->state->records / doc_cnt) |
#define | GWS_PROB |
#define | GWS_FREQ (1.0 / doc_cnt) |
#define | GWS_SQUARED pow(log((double)aio->info->state->records / doc_cnt), 2) |
#define | GWS_CUBIC pow(log((double)aio->info->state->records / doc_cnt), 3) |
#define | GWS_ENTROPY (1 - (suml / sum - log(sum)) / log(aio->info->state->records)) |
#define | FTB_YES (ft_boolean_syntax[0]) |
#define | FTB_EGAL (ft_boolean_syntax[1]) |
#define | FTB_NO (ft_boolean_syntax[2]) |
#define | FTB_INC (ft_boolean_syntax[3]) |
#define | FTB_DEC (ft_boolean_syntax[4]) |
#define | FTB_LBR (ft_boolean_syntax[5]) |
#define | FTB_RBR (ft_boolean_syntax[6]) |
#define | FTB_NEG (ft_boolean_syntax[7]) |
#define | FTB_TRUNC (ft_boolean_syntax[8]) |
#define | FTB_LQUOT (ft_boolean_syntax[10]) |
#define | FTB_RQUOT (ft_boolean_syntax[11]) |
Typedefs | |
typedef struct _st_ft_seg_iterator | FT_SEG_ITERATOR |
Variables | |
const struct _ft_vft | _ft_vft_nlq |
const struct _ft_vft | _ft_vft_boolean |
Some definitions for full-text indices.
#define FT_MAX_WORD_LEN_FOR_SORT 31 |
#define FTB_DEC (ft_boolean_syntax[4]) |
#define FTB_EGAL (ft_boolean_syntax[1]) |
#define FTB_INC (ft_boolean_syntax[3]) |
#define FTB_LBR (ft_boolean_syntax[5]) |
#define FTB_LQUOT (ft_boolean_syntax[10]) |
#define FTB_NEG (ft_boolean_syntax[7]) |
#define FTB_NO (ft_boolean_syntax[2]) |
#define FTB_RBR (ft_boolean_syntax[6]) |
#define FTB_RQUOT (ft_boolean_syntax[11]) |
#define FTB_TRUNC (ft_boolean_syntax[8]) |
#define FTB_YES (ft_boolean_syntax[0]) |
#define FTPARSER_MEMROOT_ALLOC_SIZE 65536 |
#define GWS_CUBIC pow(log((double)aio->info->state->records / doc_cnt), 3) |
#define GWS_ENTROPY (1 - (suml / sum - log(sum)) / log(aio->info->state->records)) |
#define GWS_FREQ (1.0 / doc_cnt) |
#define GWS_GFIDF (sum / doc_cnt) |
#define GWS_IDF log(aio->info->state->records / doc_cnt) |
#define GWS_IDF1 log((double)aio->info->state->records / doc_cnt) |
#define GWS_IN_USE GWS_PROB |
#define GWS_NORM (1 / sqrt(sum2)) |
#define GWS_PROB |
#define GWS_SQUARED pow(log((double)aio->info->state->records / doc_cnt), 2) |
#define LWS_BINARY (count > 0) |
#define LWS_FOR_QUERY LWS_TF |
#define LWS_IN_USE LWS_LOG |
#define LWS_TF (count) |
#define NORM_COS (sqrt(docstat.nsum2)) |
#define NORM_IN_USE NORM_PIVOT |
#define NORM_NONE (1) |
#define NORM_PIVOT (1 + PIVOT_VAL * docstat.uniq) |
#define NORM_SUM (docstat.nsum) |
#define PIVOT_VAL (0.0115) |
#define PRENORM_IN_USE PRENORM_AVG |
typedef struct _st_ft_seg_iterator FT_SEG_ITERATOR |
uint _mi_ft_parse | ( | TREE * | parsed, |
MI_INFO * | info, | ||
uint | keynr, | ||
const uchar * | record, | ||
MYSQL_FTPARSER_PARAM * | param, | ||
MEM_ROOT * | mem_root | ||
) |
FT_WORD * _mi_ft_parserecord | ( | MI_INFO * | info, |
uint | keynr, | ||
const uchar * | record, | ||
MEM_ROOT * | mem_root | ||
) |
uint _mi_ft_segiterator | ( | FT_SEG_ITERATOR * | ftsi | ) |
void _mi_ft_segiterator_dummy_init | ( | const uchar * | record, |
uint | len, | ||
FT_SEG_ITERATOR * | ftsi | ||
) |
void _mi_ft_segiterator_init | ( | MI_INFO * | info, |
uint | keynr, | ||
const uchar * | record, | ||
FT_SEG_ITERATOR * | ftsi | ||
) |
void ft_boolean_close_search | ( | FT_INFO * | ftb_base | ) |
float ft_boolean_get_relevance | ( | FT_INFO * | ftb_base | ) |
int ft_boolean_read_next | ( | FT_INFO * | ftb_base, |
char * | record | ||
) |
void ft_boolean_reinit_search | ( | FT_INFO * | ftb | ) |
uchar ft_get_word | ( | const CHARSET_INFO * | cs, |
uchar ** | start, | ||
uchar * | end, | ||
FT_WORD * | word, | ||
MYSQL_FTPARSER_BOOLEAN_INFO * | param | ||
) |
FT_INFO * ft_init_boolean_search | ( | MI_INFO * | info, |
uint | keynr, | ||
uchar * | query, | ||
uint | query_len, | ||
const CHARSET_INFO * | cs | ||
) |
FT_INFO * ft_init_nlq_search | ( | MI_INFO * | info, |
uint | keynr, | ||
uchar * | query, | ||
uint | query_len, | ||
uint | flags, | ||
uchar * | record | ||
) |
void ft_nlq_close_search | ( | FT_INFO * | handler | ) |
float ft_nlq_get_relevance | ( | FT_INFO * | handler_base | ) |
int ft_nlq_read_next | ( | FT_INFO * | handler_base, |
char * | record | ||
) |
void ft_nlq_reinit_search | ( | FT_INFO * | handler_base | ) |
int ft_parse | ( | TREE * | wtree, |
uchar * | doc, | ||
int | doclen, | ||
struct st_mysql_ftparser * | parser, | ||
MYSQL_FTPARSER_PARAM * | param, | ||
MEM_ROOT * | mem_root | ||
) |
void ft_parse_init | ( | TREE * | wtree, |
const CHARSET_INFO * | cs | ||
) |
uchar ft_simple_get_word | ( | const CHARSET_INFO * | cs, |
uchar ** | start, | ||
const uchar * | end, | ||
FT_WORD * | word, | ||
bool | skip_stopwords | ||
) |
MYSQL_FTPARSER_PARAM * ftparser_alloc_param | ( | MI_INFO * | info | ) |
void ftparser_call_deinitializer | ( | MI_INFO * | info | ) |
MYSQL_FTPARSER_PARAM * ftparser_call_initializer | ( | MI_INFO * | info, |
uint | keynr, | ||
uint | paramnr | ||
) |
int is_stopword | ( | char * | word, |
uint | len | ||
) |
|
inline |
|
extern |
|
extern |