Below is the list of changes that have just been committed into a local
5.0-fulltext repository of paul. When paul does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.2046 05/12/14 10:16:45 paul@stripped +2 -0
plugin.h:
Revise comments.
cnet_parser.c:
Add comments.
include/plugin.h
1.16 05/12/14 10:11:35 paul@stripped +36 -6
Revise comments.
plugin/fulltext/cnet_parser.c
1.16 05/12/14 10:11:24 paul@stripped +9 -0
Add comments.
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: paul
# Host: frost.snake.net
# Root: /Users/paul/bk/mysql-5.0-cnet
--- 1.15/include/plugin.h 2005-12-13 18:01:24 -06:00
+++ 1.16/include/plugin.h 2005-12-14 10:11:35 -06:00
@@ -98,6 +98,17 @@
*/
#define MYSQL_FTPARSER_FULL_BOOLEAN_INFO 2
+/*
+ Token types for boolean mode searching (used for the type member of
+ MYSQL_FTPARSER_BOOLEAN_INFO struct)
+
+ FT_TOKEN_EOF: End of data.
+ FT_TOKEN_WORD: Regular word.
+ FT_TOKEN_LEFT_PAREN: Left parenthesis (start of group/sub-expression).
+ FT_TOKEN_RIGHT_PAREN: Right parenthesis (end of group/sub-expression).
+ FT_TOKEN_STOPWORD: Stopword.
+*/
+
enum enum_ft_token_type
{
FT_TOKEN_EOF= 0,
@@ -112,8 +123,27 @@
boolean-mode metadata to the MySQL search engine for every word in
the search query. A valid instance of this structure must be filled
in by the plugin parser and passed as an argument in the call to
- mysql_add_word (the function from structure MYSQL_FTPARSER_PARAM)
- when a query is parsed in boolean mode.
+ mysql_add_word (the callback function in the MYSQL_FTPARSER_PARAM
+ structure) when a query is parsed in boolean mode.
+
+ type: The token type. Should be one of the enum_ft_token_type values.
+
+ yesno: Whether the word must be present for a match to occur:
+ >0 Must be present
+ <0 Must not be present
+ 0 Neither
+ With the default settings of the ft_boolean_syntax system variable,
+ >0 corresponds to the '+' operator, <0 corrresponds to the '-' operator,
+ and 0 means neither operator was used.
+
+ weight_adjust: A weighting factor that determines how much a match
+ for the word counts. Can be used to increase or decrease the word's
+ importance.
+
+ wasign: The sign of the weight_adjust value.
+
+ trunc: Corresponds to the '*' operator in the default setting of the
+ ft_boolean_syntax system variable.
*/
typedef struct st_mysql_ftparser_boolean_info
@@ -139,14 +169,14 @@
to invoke the MySQL default parser. If plugin's role is to extract
textual data from .doc, .pdf or .xml content, it might extract
plaintext from the content, and then pass the text to the default
- MySQL parser to be parsed. When mysql_parser is called, the param
+ MySQL parser to be parsed. When mysql_parser is called, its param
argument should be given as the mysql_ftparam value.
mysql_add_word: A server callback to add a new word. When parsing
a document, the server sets this to point at a function that adds
the word to MySQL full-text index. When parsing a search query,
this function will add the new word to the list of words to search
- for. When mysql_add_word is called, the param argument should be
+ for. When mysql_add_word is called, its param argument should be
given as the mysql_ftparam value. boolean_info can be NULL for all
cases except when mode is MYSQL_FTPARSER_FULL_BOOLEAN_INFO.
@@ -184,8 +214,8 @@
Full-text parser descriptor.
interface_version is, e.g., MYSQL_FTPARSER_INTERFACE_VERSION.
- The parse, init, and deinit functions are invoked per SQL statement
- for which the parser is used.
+ The parsing, initialization, and deinitialization functions are
+ invoked per SQL statement for which the parser is used.
*/
struct st_mysql_ftparser
--- 1.15/plugin/fulltext/cnet_parser.c 2005-12-13 12:16:00 -06:00
+++ 1.16/plugin/fulltext/cnet_parser.c 2005-12-14 10:11:24 -06:00
@@ -305,11 +305,20 @@
}
+/*
+ Descriptor for parser plugin. Only the parser main function is used.
+ The init and deinit functions are 0 because they are unused.
+*/
+
static struct st_mysql_ftparser cnet_parser_declaration=
{
MYSQL_FTPARSER_INTERFACE_VERSION, cnet_parser_parse, 0, 0
};
+
+/*
+ Descriptor for plugin library
+*/
mysql_declare_plugin
{
| Thread |
|---|
| • bk commit into 5.0-fulltext tree (paul:1.2046) | paul | 14 Dec |