1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

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
This commit is contained in:
unknown
2001-10-09 14:53:54 +02:00
parent 734e2a8bca
commit 736e5b0de2
23 changed files with 466 additions and 288 deletions

View File

@ -29,17 +29,21 @@ extern "C" {
#define FT_QUERY_MAXLEN 1024
#define HA_FT_MAXLEN 254
typedef struct ft_doc_rec {
my_off_t dpos;
double weight;
} FT_DOC;
typedef struct st_ft_info FT_INFO;
struct _ft_vft {
int (*read_next)(FT_INFO *, char *);
float (*find_relevance)(FT_INFO *, my_off_t);
void (*close_search)(FT_INFO *);
float (*get_relevance)(FT_INFO *);
my_off_t (*get_docid)(FT_INFO *);
void (*reinit_search)(FT_INFO *);
};
typedef struct st_ft_doclist {
int ndocs;
int curdoc;
void *info; /* actually (MI_INFO *) but don't want to include myisam.h */
FT_DOC doc[1];
} FT_DOCLIST;
#ifndef FT_CORE
struct st_ft_info {
struct _ft_vft *please; /* INTERCAL style :-) */
};
#endif
extern const char *ft_precompiled_stopwords[];
@ -50,12 +54,9 @@ extern uint ft_max_word_len_for_sort;
int ft_init_stopwords(const char **);
void ft_free_stopwords(void);
FT_DOCLIST * ft_nlq_init_search(void *, uint, byte *, uint, my_bool);
int ft_nlq_read_next(FT_DOCLIST *, char *);
#define ft_nlq_close_search(handler) my_free(((gptr)(handler)),MYF(0))
#define ft_nlq_get_relevance(handler) (((FT_DOCLIST *)(handler))->doc[((FT_DOCLIST *)(handler))->curdoc].weight)
#define ft_nlq_get_docid(handler) (((FT_DOCLIST *)(handler))->doc[((FT_DOCLIST *)(handler))->curdoc].dpos)
#define ft_nlq_reinit_search(handler) (((FT_DOCLIST *)(handler))->curdoc=-1)
#define FT_NL 0
#define FT_BOOL 1
FT_INFO *ft_init_search(uint,void *, uint, byte *, uint, my_bool);
#ifdef __cplusplus
}