[Groonga-mysql-commit] mroonga/mroonga [master] [doc] add examples for server variables.

Back to archive index

null+****@clear***** null+****@clear*****
2011年 11月 28日 (月) 16:51:23 JST


Kouhei Sutou	2011-11-28 07:51:23 +0000 (Mon, 28 Nov 2011)

  New Revision: e5d4a7f2c317191256e2f8a710b398ac3466105a

  Log:
    [doc] add examples for server variables.

  Modified files:
    doc/source/reference.rst

  Modified: doc/source/reference.rst (+76 -0)
===================================================================
--- doc/source/reference.rst    2011-11-28 07:48:33 +0000 (9ad7e79)
+++ doc/source/reference.rst    2011-11-28 07:51:23 +0000 (550a44d)
@@ -26,26 +26,102 @@ groonga_default_parser
 The default parser of the full text search.
 The default value can be specified by ``--with-default-parser=PARSER`` configure argument, whose default value is ``TokenBigram``.
 
+Here is an example to use ``TokenBigramSplitSymbolAlphaDigit`` as a fulltext search parser. It is used by ``body_index`` fulltext index.
+
+.. code-block:: sql
+   :linenos:
+
+   SET GLOBAL groonga_default_parser=TokenBigramSplitSymbolAlphaDigit;
+   CREATE TABLE diaries (
+     id INT PRIMARY KEY AUTO_INCREMENT,
+     body TEXT,
+     FULLTEXT INDEX body_index (body)
+   ) DEFAULT CHARSET UTF8;
+
+
 groonga_libgroonga_version
 ^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 The version string of the groonga library.
 
+Here is an example SQL to confirm the using groonga version::
+
+  mysql> SHOW VARIABLES LIKE 'groonga_libgroonga_version';
+  +----------------------------+------------------+
+  | Variable_name              | Value            |
+  +----------------------------+------------------+
+  | groonga_libgroonga_version | 1.2.8-9-gbf05b82 |
+  +----------------------------+------------------+
+  1 row in set (0.00 sec)
+
 groonga_log_file
 ^^^^^^^^^^^^^^^^
 
 The path of the log file of mroonga. The default value is ``groonga.log``.
 
+Here is an example transcript to change log file to ``/tmp/mroonga.log``::
+
+  mysql> SHOW VARIABLES LIKE 'groonga_log_file';
+  +------------------+-------------+
+  | Variable_name    | Value       |
+  +------------------+-------------+
+  | groonga_log_file | groonga.log |
+  +------------------+-------------+
+  1 row in set (0.00 sec)
+
+  mysql> SET GLOBAL groonga_log_file = "/tmp/mroonga.log";
+  Query OK, 0 rows affected (0.00 sec)
+
+  mysql> SHOW VARIABLES LIKE 'groonga_log_file';
+  +------------------+------------------+
+  | Variable_name    | Value            |
+  +------------------+------------------+
+  | groonga_log_file | /tmp/mroonga.log |
+  +------------------+------------------+
+  1 row in set (0.00 sec)
+
+
 groonga_log_level
 ^^^^^^^^^^^^^^^^^
 
 The output level of mroonga log file. The default value is ``NOTICE``.
 
+Here is an example transcript to change log level to ``DEBUG`` that logs many messages for debugging::
+
+  mysql> SHOW VARIABLES LIKE 'groonga_log_level';
+  +-------------------+--------+
+  | Variable_name     | Value  |
+  +-------------------+--------+
+  | groonga_log_level | NOTICE |
+  +-------------------+--------+
+  1 row in set (0.00 sec)
+
+  mysql> SET GLOBAL groonga_log_level = "debug";
+  Query OK, 0 rows affected (0.00 sec)
+
+  mysql> SHOW VARIABLES LIKE 'groonga_log_level';
+  +-------------------+-------+
+  | Variable_name     | Value |
+  +-------------------+-------+
+  | groonga_log_level | DEBUG |
+  +-------------------+-------+
+  1 row in set (0.00 sec)
+
 groonga_version
 ^^^^^^^^^^^^^^^
 
 The version string of mroonga.
 
+Here is an example SQL to confirm the running mroonga version::
+
+  mysql> SHOW VARIABLES LIKE 'groonga_version';
+  +-----------------+-------+
+  | Variable_name   | Value |
+  +-----------------+-------+
+  | groonga_version | 1.10  |
+  +-----------------+-------+
+  1 row in set (0.00 sec)
+
 List of status variables
 ------------------------
 




Groonga-mysql-commit メーリングリストの案内
Back to archive index