MySQL  8.0.19
Source Code Documentation
fts0types.h File Reference
#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. 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

UNIV_INLINE int fts_trx_row_doc_id_cmp (const void *p1, const void *p2)
 Compare two fts_trx_row_t instances doc_ids. More...
 
UNIV_INLINE int fts_ranking_doc_id_cmp (const void *p1, const void *p2)
 Compare two fts_ranking_t instances doc_ids. More...
 
UNIV_INLINE int fts_update_doc_id_cmp (const void *p1, const void *p2)
 Compare two fts_update_t instances doc_ids. More...
 
UNIV_INLINE ulint fts_decode_vlc (byte **ptr)
 Decode and return the integer that was encoded using our VLC scheme. More...
 
UNIV_INLINE void fts_string_dup (fts_string_t *dst, const fts_string_t *src, mem_heap_t *heap)
 Duplicate a string. More...
 
UNIV_INLINE ulint fts_get_encoded_len (ulint val)
 Return length of val if it were encoded using our VLC scheme. More...
 
UNIV_INLINE ulint fts_encode_int (ulint val, byte *buf)
 Encode an integer using our VLC scheme and return the length in bytes. More...
 
const UNIV_INLINE char * fts_get_suffix (ulint selected)
 Get the selected FTS aux INDEX suffix. More...
 
const UNIV_INLINE char * fts_get_suffix_5_7 (ulint selected)
 Return the selected FTS aux index suffix in 5.7 compatible format. More...
 
UNIV_INLINE ulint fts_select_index (const CHARSET_INFO *cs, const byte *str, ulint len)
 Select the FTS auxiliary index 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()

UNIV_INLINE ulint fts_decode_vlc ( byte **  ptr)

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

Parameters
ptrout: value decoded

◆ fts_encode_int()

UNIV_INLINE ulint fts_encode_int ( ulint  val,
byte buf 
)

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

◆ fts_get_encoded_len()

UNIV_INLINE ulint fts_get_encoded_len ( ulint  val)

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

in: value to encode

Parameters
valout: length of value encoded, in bytes

◆ fts_get_suffix()

const UNIV_INLINE char* fts_get_suffix ( ulint  selected)

Get the selected FTS aux INDEX suffix.

in: selected index

◆ fts_get_suffix_5_7()

const UNIV_INLINE char* fts_get_suffix_5_7 ( ulint  selected)

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

Parameters
[in]selectedselected index
Returns
the suffix name

◆ fts_ranking_doc_id_cmp()

UNIV_INLINE int fts_ranking_doc_id_cmp ( const void *  p1,
const void *  p2 
)

Compare two fts_ranking_t instances doc_ids.

Parameters
[in]p1id1
[in]p2id2
Returns
< 0 if n1 < n2, < 0 if n1 < n2, > 0 if n1 > n2

◆ fts_select_index()

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

Select the FTS auxiliary index for the given character.

Parameters
[in]cscharset
[in]strstring
[in]lenstring length in bytes
Returns
the index to use for the string

◆ fts_string_dup()

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

Duplicate a string.

Parameters
[in]dstdup to here
[in]srcsrc string
[in]heapheap to use

◆ fts_trx_row_doc_id_cmp()

UNIV_INLINE int fts_trx_row_doc_id_cmp ( const void *  p1,
const void *  p2 
)

Compare two fts_trx_row_t instances doc_ids.

Parameters
[in]p1id1
[in]p2id2
Returns
< 0 if n1 < n2, < 0 if n1 < n2, > 0 if n1 > n2

◆ fts_update_doc_id_cmp()

UNIV_INLINE int fts_update_doc_id_cmp ( const void *  p1,
const void *  p2 
)

Compare two fts_update_t instances doc_ids.

Parameters
[in]p1id1
[in]p2id2
Returns
< 0 if n1 < n2, < 0 if n1 < n2, > 0 if n1 > n2

Variable Documentation

◆ fts_index_selector

const fts_index_selector_t fts_index_selector[]

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[]

It's defined in fts/fts0fts.c.

It's defined in fts/fts0fts.c.