You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

72 lines
2.0 KiB

26 years ago
26 years ago
26 years ago
26 years ago
26 years ago
26 years ago
26 years ago
  1. /* Copyright (C) 2000-2003 MySQL AB
  2. This program is free software; you can redistribute it and/or modify
  3. it under the terms of the GNU General Public License as published by
  4. the Free Software Foundation; either version 2 of the License, or
  5. (at your option) any later version.
  6. This program is distributed in the hope that it will be useful,
  7. but WITHOUT ANY WARRANTY; without even the implied warranty of
  8. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  9. GNU General Public License for more details.
  10. You should have received a copy of the GNU General Public License
  11. along with this program; if not, write to the Free Software
  12. Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
  13. /* Written by Sergei A. Golubchik, who has a shared copyright to this code */
  14. /* some definitions for full-text indices */
  15. /* #include "myisam.h" */
  16. #ifndef _ft_global_h
  17. #define _ft_global_h
  18. #ifdef __cplusplus
  19. extern "C" {
  20. #endif
  21. #define HA_FT_MAXBYTELEN 254
  22. #define HA_FT_MAXCHARLEN (HA_FT_MAXBYTELEN/3)
  23. typedef struct st_ft_info FT_INFO;
  24. struct _ft_vft
  25. {
  26. int (*read_next)(FT_INFO *, char *);
  27. float (*find_relevance)(FT_INFO *, byte *, uint);
  28. void (*close_search)(FT_INFO *);
  29. float (*get_relevance)(FT_INFO *);
  30. void (*reinit_search)(FT_INFO *);
  31. };
  32. #ifndef FT_CORE
  33. struct st_ft_info
  34. {
  35. struct _ft_vft *please; /* INTERCAL style :-) */
  36. };
  37. #endif
  38. extern const char *ft_stopword_file;
  39. extern const char *ft_precompiled_stopwords[];
  40. extern ulong ft_min_word_len;
  41. extern ulong ft_max_word_len;
  42. extern ulong ft_query_expansion_limit;
  43. extern char ft_boolean_syntax[15];
  44. extern struct st_mysql_ftparser ft_default_parser;
  45. int ft_init_stopwords(void);
  46. void ft_free_stopwords(void);
  47. #define FT_NL 0
  48. #define FT_BOOL 1
  49. #define FT_SORTED 2
  50. #define FT_EXPAND 4 /* query expansion */
  51. FT_INFO *ft_init_search(uint,void *, uint, byte *, uint,CHARSET_INFO *, byte *);
  52. my_bool ft_boolean_check_syntax_string(const byte *);
  53. #ifdef __cplusplus
  54. }
  55. #endif
  56. #endif