diff options
author | unknown <serg@serg.mysql.com> | 2001-10-09 14:53:54 +0200 |
---|---|---|
committer | unknown <serg@serg.mysql.com> | 2001-10-09 14:53:54 +0200 |
commit | 515052ec826403ca48cdfd7883c4fa0d0c91d3a1 (patch) | |
tree | c39107b036ff091f557b03a1f37183735dcddbad /myisam/ft_static.c | |
parent | 284d48c16dbe474e26cea2fa6e2aaeda3b5a196d (diff) | |
download | mariadb-git-515052ec826403ca48cdfd7883c4fa0d0c91d3a1.tar.gz |
Boolean search passes _some_ tests
sql/ha_myisam.cc:
One more abstraction layer added (C++ emulated in C :).
include/ft_global.h:
boolean search code plugged in
mysql-test/r/fulltext_cache.result:
boolean search code plugged in
mysql-test/r/fulltext_left_join.result:
boolean search code plugged in
mysql-test/r/fulltext_multi.result:
boolean search code plugged in
mysql-test/r/fulltext_order_by.result:
boolean search code plugged in
sql/lex.h:
IN BOOLEAN MODE syntax
myisam/ft_nlq_search.c:
boolean search code plugged in
myisam/ftdefs.h:
boolean search code plugged in
sql/ha_myisam.h:
boolean search code plugged in
sql/handler.h:
boolean search code plugged in
include/my_base.h:
do_not_sort_keyseg feature for MyISAM
include/my_global.h:
#define comp(a,b) (((a) < (b)) ? -1 : ((a) > (b)) ? 1 : 0)
myisam/ft_boolean_search.c:
bugfixing
myisam/ft_parser.c:
cleanup
myisam/ft_static.c:
do_not_sort_keyseg feature for MyISAM
myisam/mi_search.c:
do_not_sort_keyseg feature for MyISAM
myisam/mi_write.c:
cleanup
mysql-test/t/fulltext.test:
boolean search tests added
BitKeeper/etc/ignore:
Added myisam/FT1.MYD myisam/FT1.MYI to the ignore list
sql/item_func.cc:
boolean search
sql/item_func.h:
boolean search
sql/sql_yacc.yy:
boolean search
Diffstat (limited to 'myisam/ft_static.c')
-rw-r--r-- | myisam/ft_static.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/myisam/ft_static.c b/myisam/ft_static.c index 09afadec23f..494d7638d67 100644 --- a/myisam/ft_static.c +++ b/myisam/ft_static.c @@ -43,10 +43,29 @@ const MI_KEYSEG ft_keysegs[FT_SEGS]={ }, #endif /* EVAL_RUN */ { - HA_FT_WTYPE, 7, 0, 0, 0, 0, HA_FT_WLEN, 0, 0, NULL + HA_FT_WTYPE, 7, 0, 0, 0, HA_NO_SORT, HA_FT_WLEN, 0, 0, NULL } }; +const struct _ft_vft _ft_vft_nlq = { + ft_nlq_read_next, ft_nlq_find_relevance, ft_nlq_close_search, + ft_nlq_get_relevance, ft_nlq_get_docid, ft_nlq_reinit_search +}; +const struct _ft_vft _ft_vft_boolean = { + ft_boolean_read_next, ft_boolean_find_relevance, ft_boolean_close_search, + ft_boolean_get_relevance, ft_boolean_get_docid, ft_boolean_reinit_search +}; + +FT_INFO *(*_ft_init_vft[2])(MI_INFO *, uint, byte *, uint, my_bool) = +{ ft_init_nlq_search, ft_init_boolean_search }; + +FT_INFO *ft_init_search(uint mode, void *info, uint keynr, + byte *query, uint query_len, my_bool presort) +{ + return (*_ft_init_vft[mode])((MI_INFO *)info, keynr, + query, query_len, presort); +} + const char *ft_precompiled_stopwords[] = { #ifdef COMPILE_STOPWORDS_IN |