Debian Codegraph @

doc/source/reference/commands/register.rst

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