MySQL 9.1.0
Source Code Documentation
fts0types.h File Reference

Full text search types file. More...

#include "fts0fts.h"
#include "fut0fut.h"
#include "pars0pars.h"
#include "que0types.h"
#include "univ.i"
#include "ut0byte.h"
#include "ut0rbt.h"
#include "fts0types.ic"
#include "fts0vlc.ic"

Go to the source code of this file.

Classes

struct  fts_doc_stats_t
 Statistics relevant to a particular document, used during retrieval. More...
 
struct  fts_get_doc_t
 It's main purpose is to store the SQL prepared statements that are required to retrieve a document from the database. More...
 
struct  fts_index_cache_t
 Since we can have multiple FTS indexes on a table, we keep a per index cache of words etc. More...
 
struct  fts_update_t
 For supporting the tracking of updates on multiple FTS indexes we need to track which FTS indexes need to be updated. More...
 
struct  fts_stopword_t
 Stop word control infotmation. More...
 
struct  fts_sync_t
 The SYNC state of the cache. More...
 
struct  fts_cache_t
 The cache for the FTS system. More...
 
struct  fts_node_t
 Columns of the FTS auxiliary INDEX table. More...
 
struct  fts_tokenizer_word_t
 A tokenizer word. More...
 
struct  fts_word_t
 Word text plus it's array of nodes as on disk in FTS index. More...
 
struct  fts_fetch_t
 Callback for reading and filtering nodes that are read from FTS index. More...
 
struct  fts_index_selector_t
 For horizontally splitting an FTS auxiliary index. More...
 
struct  fts_doc_t
 This type represents a single document field. More...
 
struct  fts_token_t
 A token and its positions within a document. More...
 

Typedefs

typedef pars_user_func_cb_t fts_sql_callback
 Callbacks used within FTS. More...
 
typedef void(* fts_filter) (void *, fts_node_t *, void *, ulint len)
 

Functions

ulint fts_decode_vlc (byte **ptr)
 Decode and return the integer that was encoded using our VLC scheme. More...
 
void fts_string_dup (fts_string_t *dst, const fts_string_t *src, mem_heap_t *heap)
 Duplicate a string. More...
 
ulint fts_get_encoded_len (ulint val)
 Return length of val if it were encoded using our VLC scheme. More...
 
ulint fts_encode_int (ulint val, byte *buf)
 Encode an integer using our VLC scheme and return the length in bytes. More...
 
const char * fts_get_suffix (ulint selected)
 Get the selected FTS aux INDEX suffix. More...
 
const char * fts_get_suffix_5_7 (ulint selected)
 Return the selected FTS aux index suffix in 5.7 compatible format. More...
 
ulint fts_select_index (const CHARSET_INFO *cs, const byte *str, ulint len)
 Select the FTS auxiliary table for the given character. More...
 

Variables

const fts_index_selector_t fts_index_selector []
 It's defined in fts/fts0fts.c. More...
 
const fts_index_selector_t fts_index_selector_5_7 []
 It's defined in fts/fts0fts.c. More...
 

Detailed Description

Full text search types file.

Created 2007-03-27 Sunny Bains

Typedef Documentation

◆ fts_filter

typedef void(* fts_filter) (void *, fts_node_t *, void *, ulint len)

◆ fts_sql_callback

Callbacks used within FTS.

Function Documentation

◆ fts_decode_vlc()

ulint fts_decode_vlc ( byte **  ptr)
inline

Decode and return the integer that was encoded using our VLC scheme.

in: ptr to decode from, this ptr is incremented by the number of bytes decoded

Returns
value decoded
Parameters
ptrout: value decoded

◆ fts_encode_int()

ulint fts_encode_int ( ulint  val,
byte buf 
)
inline

Encode an integer using our VLC scheme and return the length in bytes.

Parameters
[in]valvalue to encode
[in]bufbuffer, must have enough space
Returns
length of value encoded, in bytes
length of value encoded, in bytes

◆ fts_get_encoded_len()

ulint fts_get_encoded_len ( ulint  val)
inline

Return length of val if it were encoded using our VLC scheme.

in: value to encode

FIXME: We will need to be able encode 8 bytes value

Returns
length of value encoded, in bytes
Parameters
valout: length of value encoded, in bytes

◆ fts_get_suffix()

const char * fts_get_suffix ( ulint  selected)
inline

Get the selected FTS aux INDEX suffix.

in: selected index

Get the selected FTS aux INDEX suffix.

Parameters
selectedin: selected index

◆ fts_get_suffix_5_7()

const char * fts_get_suffix_5_7 ( ulint  selected)
inline

Return the selected FTS aux index suffix in 5.7 compatible format.

Parameters
[in]selectedselected index
Returns
the suffix name

◆ fts_select_index()

ulint fts_select_index ( const CHARSET_INFO cs,
const byte str,
ulint  len 
)
inline

Select the FTS auxiliary table for the given character.

Parameters
[in]cscharset
[in]strstring
[in]lenstring length in bytes
Return values
theauxiliary table number to use for the string, zero-based

◆ fts_string_dup()

void fts_string_dup ( fts_string_t dst,
const fts_string_t src,
mem_heap_t heap 
)
inline

Duplicate a string.

Parameters
[in]dstdup to here
[in]srcsrc string
[in]heapheap to use
Parameters
dstin: dup to here
srcin: src string
heapin: heap to use

Variable Documentation

◆ fts_index_selector

const fts_index_selector_t fts_index_selector[]
extern

It's defined in fts/fts0fts.c.

It's defined in fts/fts0fts.c.

◆ fts_index_selector_5_7

const fts_index_selector_t fts_index_selector_5_7[]
extern

It's defined in fts/fts0fts.c.

It's defined in fts/fts0fts.c.