File: plugin_register.rst

package info (click to toggle)
groonga 16.0.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 188,416 kB
  • sloc: ansic: 772,827; cpp: 52,396; ruby: 40,556; javascript: 10,250; yacc: 7,045; sh: 5,627; python: 2,821; makefile: 1,679
file content (62 lines) | stat: -rw-r--r-- 1,499 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
.. -*- rst -*-

.. groonga-command
.. database: commands_plugin_register

``plugin_register``
===================

.. versionadded:: 5.0.1

Summary
-------

``plugin_register`` command registers a plugin. You need to register a plugin
before you use a plugin.

You need just one ``plugin_register`` command for a plugin in the same
database because registered plugin information is written into the
database.  When you restart your ``groonga`` process, ``groonga``
process loads all registered plugins without ``plugin_register`` command.

You can unregister a registered plugin by :doc:`plugin_unregister`.

Syntax
------

This command takes only one required parameter::

  plugin_register name

Usage
-----

Here is a sample that registers ``QueryExpanderTSV`` query expander
that is included in
``${PREFIX}/lib/groonga/plugins/query_expanders/tsv.so``.

.. groonga-command
.. include:: ../../example/reference/commands/plugin_register/query_expanders_tsv.log
.. plugin_register query_expanders/tsv

You can omit ``${PREFIX}/lib/groonga/plugins/`` and suffix (``.so``).
They are completed automatically.

You can specify absolute path such as ``plugin_register
/usr/lib/groonga/plugins/query_expanders/tsv.so``.

Return value
------------

``plugin_register`` returns ``true`` as body on success such as::

  [HEADER, true]

If ``plugin_register`` fails, error details are in ``HEADER``.

See :doc:`/reference/command/output_format` for ``HEADER``.

See also
--------

* :doc:`plugin_unregister`