System plugins

CREATE PLUGIN

CREATE PLUGIN plugin_name TYPE 'plugin_type' SONAME 'plugin_library'

Loads the given library (if it is not already loaded) and loads the specified plugin from it. The available plugin types include:

  • ranker
  • index_token_filter
  • query_token_filter

For more information on writing plugins, please refer to the plugins documentation.

mysql> CREATE PLUGIN myranker TYPE 'ranker' SONAME 'myplugins.so';
Query OK, 0 rows affected (0.00 sec)

CREATE BUDDY PLUGIN

Buddy plugins can extend Manticore Search's functionality and enable certain queries that are not natively supported. To learn more about creating Buddy plugins, we recommend reading this article.

To create a Buddy plugin, run the following SQL command:

CREATE PLUGIN <username/package name on https://packagist.org/> TYPE 'buddy' VERSION <package version>

NOTE: CREATE BUDDY PLUGIN requires Manticore Buddy. If it doesn't work, make sure Buddy is installed.

You can also use an alias command specifically created for Buddy plugins, which is easier to remember:

CREATE BUDDY PLUGIN <username/package name on https://packagist.org/> VERSION <package version>

This command will install the show-hostname plugin to the plugin_dir and enable it without the need to restart the server.

‹›
  • Example
Example
📋
CREATE PLUGIN manticoresoftware/buddy-plugin-show-hostname TYPE 'buddy' VERSION 'dev-main';

CREATE BUDDY PLUGIN manticoresoftware/buddy-plugin-show-hostname VERSION 'dev-main';

DELETE PLUGIN

DROP PLUGIN plugin_name TYPE 'plugin_type'

Marks the designated plugin for unloading. The unloading process is not instantaneous, as concurrent queries may still be utilizing it. Nevertheless, following a DROP, new queries will no longer have access to the plugin. Subsequently, when all ongoing queries involving the plugin have finished, the plugin will be unloaded. If all plugins from the specified library are unloaded, the library will also be automatically unloaded.

mysql> DROP PLUGIN myranker TYPE 'ranker';
Query OK, 0 rows affected (0.00 sec)

DELETE BUDDY PLUGIN

DELETE BUDDY PLUGIN <username/package name on https://packagist.org/>

NOTE: DELETE BUDDY PLUGIN requires Manticore Buddy. If it doesn't work, make sure Buddy is installed.

This action instantly and permanently removes the installed plugin from the plugin_dir. Once removed, the plugin's features will no longer be available.

‹›
  • Example
Example
📋
DELETE BUDDY PLUGIN manticoresoftware/buddy-plugin-show-hostname

Enabling and disabling Buddy plugins

To simplify the control of Buddy plugins, especially when developing a new one or modifying an existing one, the enable and disable Buddy plugin commands are provided. These commands act temporarily during runtime and will reset to their defaults after restarting the daemon or performing a Buddy reset. To permanently disable a plugin, it must be removed.

You need the fully qualified package name of the plugin to enable or disable it. To find it, you can run the SHOW BUDDY PLUGINS query and look for the full qualified name in the package field. For example, the SHOW plugin has the fully qualified name manticoresoftware/buddy-plugin-show.

ENABLE BUDDY PLUGIN

ENABLE BUDDY PLUGIN <username/package name on https://packagist.org/>

NOTE: ENABLE BUDDY PLUGIN requires Manticore Buddy. If it doesn't work, make sure Buddy is installed.

This command reactivates a previously disabled Buddy plugin, allowing it to process your requests again.

‹›
  • SQL
SQL
📋
ENABLE BUDDY PLUGIN manticoresoftware/buddy-plugin-show

DISABLE BUDDY PLUGIN

DISABLE BUDDY PLUGIN <username/package name on https://packagist.org/>

This command deactivates an active Buddy plugin, preventing it from processing any further requests.

‹›
  • SQL
SQL
📋
DISABLE BUDDY PLUGIN manticoresoftware/buddy-plugin-show

After disabling, if you try the SHOW QUERIES command, you'll encounter an error because the plugin is disabled.