mySQL 5.0.11 sources for tomato
[tomato.git] / release / src / router / mysql / include / ft_global.h
blob4ded43c614cc7543f4767f732871a109e2e250d9
1 /* Copyright (c) 2000-2005, 2007 MySQL AB
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; version 2 of the License.
7 This program is distributed in the hope that it will be useful,
8 but WITHOUT ANY WARRANTY; without even the implied warranty of
9 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 GNU General Public License for more details.
12 You should have received a copy of the GNU General Public License
13 along with this program; if not, write to the Free Software
14 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */
16 /* Written by Sergei A. Golubchik, who has a shared copyright to this code */
18 /* some definitions for full-text indices */
20 /* #include "myisam.h" */
22 #ifndef _ft_global_h
23 #define _ft_global_h
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
28 #define HA_FT_MAXBYTELEN 254
29 #define HA_FT_MAXCHARLEN (HA_FT_MAXBYTELEN/3)
31 typedef struct st_ft_info FT_INFO;
32 struct _ft_vft
34 int (*read_next)(FT_INFO *, char *);
35 float (*find_relevance)(FT_INFO *, uchar *, uint);
36 void (*close_search)(FT_INFO *);
37 float (*get_relevance)(FT_INFO *);
38 void (*reinit_search)(FT_INFO *);
41 #ifndef FT_CORE
42 struct st_ft_info
44 struct _ft_vft *please; /* INTERCAL style :-) */
46 #endif
48 extern const char *ft_stopword_file;
49 extern const char *ft_precompiled_stopwords[];
51 extern ulong ft_min_word_len;
52 extern ulong ft_max_word_len;
53 extern ulong ft_query_expansion_limit;
54 extern char ft_boolean_syntax[15];
55 extern struct st_mysql_ftparser ft_default_parser;
57 int ft_init_stopwords(void);
58 void ft_free_stopwords(void);
60 #define FT_NL 0
61 #define FT_BOOL 1
62 #define FT_SORTED 2
63 #define FT_EXPAND 4 /* query expansion */
65 FT_INFO *ft_init_search(uint,void *, uint, uchar *, uint,CHARSET_INFO *, uchar *);
66 my_bool ft_boolean_check_syntax_string(const uchar *);
68 #ifdef __cplusplus
70 #endif
71 #endif