Debian Codegraph @

doc/source/reference/commands/plugin_register.rst

raw
1 .. -*- rst -*-
2
3 .. groonga-command
4 .. database: commands_plugin_register
5
6 ``plugin_register``
7 ===================
8
9 .. versionadded:: 5.0.1
10
11 Summary
12 -------
13
14 ``plugin_register`` command registers a plugin. You need to register a plugin
15 before you use a plugin.
16
17 You need just one ``plugin_register`` command for a plugin in the same
18 database because registered plugin information is written into the
19 database. When you restart your ``groonga`` process, ``groonga``
20 process loads all registered plugins without ``plugin_register`` command.
21
22 You can unregister a registered plugin by :doc:`plugin_unregister`.
23
24 Syntax
25 ------
26
27 This command takes only one required parameter::
28
29 plugin_register name
30
31 Usage
32 -----
33
34 Here is a sample that registers ``QueryExpanderTSV`` query expander
35 that is included in
36 ``${PREFIX}/lib/groonga/plugins/query_expanders/tsv.so``.
37
38 .. groonga-command
39 .. include:: ../../example/reference/commands/plugin_register/query_expanders_tsv.log
40 .. plugin_register query_expanders/tsv
41
42 You can omit ``${PREFIX}/lib/groonga/plugins/`` and suffix (``.so``).
43 They are completed automatically.
44
45 You can specify absolute path such as ``plugin_register
46 /usr/lib/groonga/plugins/query_expanders/tsv.so``.
47
48 Return value
49 ------------
50
51 ``plugin_register`` returns ``true`` as body on success such as::
52
53 [HEADER, true]
54
55 If ``plugin_register`` fails, error details are in ``HEADER``.
56
57 See :doc:`/reference/command/output_format` for ``HEADER``.
58
59 See also
60 --------
61
62 * :doc:`plugin_unregister`