1/*****************************************************************************
2
3Copyright (c) 2013, Oracle and/or its affiliates. All Rights Reserved.
4
5This program is free software; you can redistribute it and/or modify it under
6the terms of the GNU General Public License as published by the Free Software
7Foundation; version 2 of the License.
8
9This program is distributed in the hope that it will be useful, but WITHOUT
10ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
12
13You should have received a copy of the GNU General Public License along with
14this program; if not, write to the Free Software Foundation, Inc.,
1551 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
16
17*****************************************************************************/
18
19/******************************************************************//**
20@file include/fts0plugin.h
21Full text search plugin header file
22
23Created 2013/06/04 Shaohua Wang
24***********************************************************************/
25
26#ifndef INNOBASE_FTS0PLUGIN_H
27#define INNOBASE_FTS0PLUGIN_H
28
29#include "ha_prototypes.h"
30
31extern struct st_mysql_ftparser fts_default_parser;
32
33struct 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/******************************************************************//**
39fts parse query by plugin parser.
40@return 0 if parse successfully, or return non-zero. */
41int
42fts_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