1
/* Copyright (C) 2000-2005 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 */
20
ulong ft_min_word_len=4;
21
ulong ft_max_word_len=HA_FT_MAXCHARLEN;
22
ulong ft_query_expansion_limit=5;
23
char ft_boolean_syntax[]="+ -><()~*:\"\"&|";
25
const HA_KEYSEG ft_keysegs[FT_SEGS]={
28
HA_FT_WLEN, /* start */
31
HA_VAR_LENGTH_PART | HA_PACK_KEY, /* flag */
32
HA_FT_MAXBYTELEN, /* length */
33
HA_KEYTYPE_VARTEXT2, /* type */
34
63, /* language (will be overwritten) */
36
2, 0, 0 /* bit_start, bit_end, bit_length */
40
Note, this (and the last HA_KEYTYPE_END) segment should NOT
41
be packed in any way, otherwise w_search() won't be able to
42
update key entry 'in vivo'
44
0, 0, 0, 0, HA_NO_SORT, HA_FT_WLEN, HA_FT_WTYPE, 63, 0, 0, 0, 0
48
const struct _ft_vft _ft_vft_nlq = {
49
ft_nlq_read_next, ft_nlq_find_relevance, ft_nlq_close_search,
50
ft_nlq_get_relevance, ft_nlq_reinit_search
52
const struct _ft_vft _ft_vft_boolean = {
53
ft_boolean_read_next, ft_boolean_find_relevance, ft_boolean_close_search,
54
ft_boolean_get_relevance, ft_boolean_reinit_search
58
FT_INFO *ft_init_search(uint flags, void *info, uint keynr,
59
uchar *query, uint query_len, CHARSET_INFO *cs,
64
res= ft_init_boolean_search((MI_INFO *)info, keynr, query, query_len,cs);
66
res= ft_init_nlq_search((MI_INFO *)info, keynr, query, query_len, flags,
71
const char *ft_stopword_file = 0;
72
const char *ft_precompiled_stopwords[] = {
74
#ifdef COMPILE_STOPWORDS_IN
76
/* This particular stopword list was taken from SMART distribution
77
ftp://ftp.cs.cornell.edu/pub/smart/smart.11.0.tar.Z
78
it was slightly modified to my taste, though
628
static int ft_default_parser_parse(MYSQL_FTPARSER_PARAM *param)
630
return param->mysql_parse(param, param->doc, param->length);
633
struct st_mysql_ftparser ft_default_parser=
635
MYSQL_FTPARSER_INTERFACE_VERSION, ft_default_parser_parse, 0, 0