summaryrefslogtreecommitdiff
path: root/myisam/ft_static.c
diff options
context:
space:
mode:
authorunknown <serg@serg.mylan>2003-10-23 15:21:06 +0200
committerunknown <serg@serg.mylan>2003-10-23 15:21:06 +0200
commitaa98f58bae74bc25a557d146b7a1bae80217c342 (patch)
tree2ce015b91940f6ae6e70f56ba571010c4c8eb3f0 /myisam/ft_static.c
parentfd85cc84e4cad1f40e09af35265f47cf57750c49 (diff)
downloadmariadb-git-aa98f58bae74bc25a557d146b7a1bae80217c342.tar.gz
query expansion for fulltext search
myisam/ft_boolean_search.c: assert.h and queues.h moved to ftdefs.h myisam/ft_parser.c: ft_parse() with alloc myisam/ft_static.c: api changes, ft_max_word_len_for_sort variable removed myisam/ft_update.c: ft_parse() with alloc myisam/ftdefs.h: variable ft_max_word_len_for_sort -> define FT_MAX_WORD_LEN_FOR_SORT api changes, ft_max_word_len_for_sort variable removed ft_parse() with alloc myisam/mi_check.c: variable ft_max_word_len_for_sort -> define FT_MAX_WORD_LEN_FOR_SORT myisam/myisamchk.c: ft_max_word_len_for_sort removed mysql-test/r/fulltext.result: query expansion tests mysql-test/r/fulltext_var.result: ft_max_word_len_for_sort removed mysql-test/t/fulltext.test: query expansion tests sql/ha_myisam.h: ft api changes for query expansion sql/mysqld.cc: ft_max_word_len_for_sort removed ft_query_expansion_limit added sql/set_var.cc: ft_max_word_len_for_sort removed ft_query_expansion_limit added sql/sql_yacc.yy: EXPANSION added to keyword: rule
Diffstat (limited to 'myisam/ft_static.c')
-rw-r--r--myisam/ft_static.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/myisam/ft_static.c b/myisam/ft_static.c
index ca3054ae977..2edb86679e9 100644
--- a/myisam/ft_static.c
+++ b/myisam/ft_static.c
@@ -20,7 +20,7 @@
ulong ft_min_word_len=4;
ulong ft_max_word_len=HA_FT_MAXLEN;
-ulong ft_max_word_len_for_sort=20;
+ulong ft_query_expansion_limit=5;
const char *ft_boolean_syntax="+ -><()~*:\"\"&|";
const HA_KEYSEG ft_keysegs[FT_SEGS]={
@@ -53,14 +53,13 @@ const struct _ft_vft _ft_vft_boolean = {
ft_boolean_get_relevance, ft_boolean_reinit_search
};
-FT_INFO *(*_ft_init_vft[2])(MI_INFO *, uint, byte *, uint, uint) =
-{ ft_init_nlq_search, ft_init_boolean_search };
-
FT_INFO *ft_init_search(uint flags, void *info, uint keynr,
- byte *query, uint query_len)
+ byte *query, uint query_len, byte *record)
{
- return (*_ft_init_vft[ flags&1 ])((MI_INFO *)info, keynr,
- query, query_len, flags);
+ if (flags & FT_BOOL)
+ ft_init_boolean_search((MI_INFO *)info, keynr, query, query_len);
+ else
+ ft_init_nlq_search((MI_INFO *)info, keynr, query, query_len, flags, record);
}
const char *ft_stopword_file = 0;