1 | /***************************************************************************** |
2 | |
3 | Copyright (c) 2013, Oracle and/or its affiliates. All Rights Reserved. |
4 | |
5 | This program is free software; you can redistribute it and/or modify it under |
6 | the terms of the GNU General Public License as published by the Free Software |
7 | Foundation; version 2 of the License. |
8 | |
9 | This program is distributed in the hope that it will be useful, but WITHOUT |
10 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
11 | FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. |
12 | |
13 | You should have received a copy of the GNU General Public License along with |
14 | this program; if not, write to the Free Software Foundation, Inc., |
15 | 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA |
16 | |
17 | *****************************************************************************/ |
18 | |
19 | /******************************************************************//** |
20 | @file include/fts0plugin.h |
21 | Full text search plugin header file |
22 | |
23 | Created 2013/06/04 Shaohua Wang |
24 | ***********************************************************************/ |
25 | |
26 | #ifndef INNOBASE_FTS0PLUGIN_H |
27 | #define INNOBASE_FTS0PLUGIN_H |
28 | |
29 | #include "ha_prototypes.h" |
30 | |
31 | extern struct st_mysql_ftparser fts_default_parser; |
32 | |
33 | struct fts_ast_state_t; |
34 | |
35 | #define PARSER_INIT(parser, arg) if (parser->init) { parser->init(arg); } |
36 | #define PARSER_DEINIT(parser, arg) if (parser->deinit) { parser->deinit(arg); } |
37 | |
38 | /******************************************************************//** |
39 | fts parse query by plugin parser. |
40 | @return 0 if parse successfully, or return non-zero. */ |
41 | int |
42 | fts_parse_by_parser( |
43 | /*================*/ |
44 | ibool mode, /*!< in: query boolean mode */ |
45 | uchar* query, /*!< in: query string */ |
46 | ulint len, /*!< in: query string length */ |
47 | st_mysql_ftparser* parse, /*!< in: fts plugin parser */ |
48 | fts_ast_state_t* state); /*!< in: query parser state */ |
49 | |
50 | #endif /* INNOBASE_FTS0PLUGIN_H */ |
51 | |