summaryrefslogtreecommitdiff
path: root/include/ft_global.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/ft_global.h')
-rw-r--r--include/ft_global.h44
1 files changed, 27 insertions, 17 deletions
diff --git a/include/ft_global.h b/include/ft_global.h
index 3937bd87c7f..9acdf6aaaf3 100644
--- a/include/ft_global.h
+++ b/include/ft_global.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -27,29 +27,39 @@ extern "C" {
#endif
#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 *, byte *, uint);
+ void (*close_search)(FT_INFO *);
+ float (*get_relevance)(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_stopword_file;
extern const char *ft_precompiled_stopwords[];
-int ft_init_stopwords(const char **);
+extern ulong ft_min_word_len;
+extern ulong ft_max_word_len;
+extern ulong ft_max_word_len_for_sort;
+extern const char *ft_boolean_syntax;
+
+int ft_init_stopwords(void);
void ft_free_stopwords(void);
-FT_DOCLIST * ft_init_search(void *, uint, byte *, uint, my_bool);
-int ft_read_next(FT_DOCLIST *, char *);
-#define ft_close_search(handler) my_free(((gptr)(handler)),MYF(0))
-#define ft_get_relevance(handler) ((handler)->doc[(handler)->curdoc].weight)
-#define ft_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
}