1 /* Copyright (C) 2000-2003 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 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" */
28 #define HA_FT_MAXBYTELEN 254
29 #define HA_FT_MAXCHARLEN (HA_FT_MAXBYTELEN/3)
31 typedef struct st_ft_info FT_INFO
;
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
*);
44 struct _ft_vft
*please
; /* INTERCAL style :-) */
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);
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
*);