Manticore Search is an Open Source database for search that was created in 2017 as a continuation of Sphinx Search engine (Started in 2001). It is integrated with Tiki Wiki CMS Groupware and one of the components of WikiSuite. This is especially interesting for the Tiki Trackers database web app builder. Manticore Search is very appreciated by its community.
Status:
You can check out benchmarks at: https://db-benchmarks.com/
How to install
It is normally this:
sudo apt-get install wikisuite-manticore
How to verify version
This confirms if it installed properly, but it doesn't mean it's running in the background (see next section)
root~# searchd -v Manticore 6.0.2 89c7a5139@230210 (columnar 2.0.0 a7c703d@230130) (secondary 2.0.0 a7c703d@230130) Copyright (c) 2001-2016, Andrew Aksyonoff Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com) Copyright (c) 2017-2023, Manticore Software LTD (https://manticoresearch.com)
Start service at server reboot
For Manticore to be available for applications like Tiki Wiki CMS Groupware, you want to enable
sudo systemctl enable manticore
In some newer operating systems it can fail with error "Failed to enable unit: Unit ... is transient or generated.". In this can you can remove the generator and try again. It's unlikely you need the generator ever again after Manticore is installed.
In Debian-based operating systems run:
sudo rm /lib/systemd/system-generators/manticore-generator sudo systemctl daemon-reload sudo systemctl enable manticore
For more detail, please see: https://manual.manticoresearch.com/Starting_the_server/Linux#Starting-and-stopping-using-systemd
To check if the Manticore service is set to run at boot
sudo systemctl is-enabled manticore
Then reboot to test
sudo reboot
It is not recommended to use this unless you are a developer, but if you prefer "Nightly" (development) versions, please see: https://manual.manticoresearch.com/Installation/Debian_and_Ubuntu#APT-repository
Restart Manticore with the debug logging level
sudo systemctl set-environment _ADDITIONAL_SEARCHD_PARAMS='--logdebug' sudo systemctl restart manticore
To undo it, run:
sudo systemctl set-environment _ADDITIONAL_SEARCHD_PARAMS='' sudo systemctl restart manticore
Note : -- logdebug, -- logreplication, -- logdebugv, and -- logdebugvv options enable additional debug output in the server log. They differ by the logging verboseness level. These are debugging options and should not be normally enabled, as they can pollute the log a lot. They can be used temporarily on request to assist with complicated debugging sessions.
Restart manticore after writing a bad index
The offending index must be deleted from the disk (/var/lib/manticore/) and then manticore restarted.
To find out exactly which index is bad and should be deleted, logs must be analyzed
Note : By default, Manticore logs all runtime events in a searchd.log file in the directory where searchd was started. In Linux by default, you can find the log at /var/log/manticore/searchd.log.
Indicate to Tiki to use Manticore Search
- Pick Manticore as Unified search engine at tiki-admin.php?page=search
- Rebuild index
- Small sites, via GUI
- Medium and large sites, via CLI
php console.php index:rebuild --log
- Enjoy!
Syntax error or access violation: 1064
If you get this error:
SQLSTATE[42000]: Syntax error or access violation: 1064 error adding index 'tiki_pref_en': file not found: '/home/example/tmp/manticore-stopwords-tiki_pref_en'
The temporary workaround:
Virtualmin Virtual Server -> Services -> PHP-FPM Configuration -> Edit Configuration Manually
Old:
php_admin_value[sys_temp_dir] = /home/example/tmp
New:
php_admin_value[sys_temp_dir] = /tmp
Configuration file
On Debian 10 and 11, it is located at /etc/manticoresearch/manticore.conf
Here are tweaks you may want to do in /etc/manticoresearch/manticore.conf
Disabling binary logging
Tiki uses Manticore as an index. So it's a copy of the data, optimized for speed and search. The real data lives in MariaDB/MySQL. Thus, we don't need binary logging because we can rebuild the index any time.
binlog_path = # disable logging to improve performance, and it's not needed in the Tiki context.
Ref: https://manual.manticoresearch.com/Logging/Binary_logging#Disabling-binary-logging
Increasing max_packet_size
If you get errors like this on index rebuild:
2023-03-03T16:07:21+00:00 ERR (3): NOTICE: PDOStatement::execute(): send of 32768 bytes failed with errno=104 Connection reset by peer {\"code\":null,\"file\":\"/lib/core/Search/Manticore/PdoClient.php\",\"line\":201}
you can increase max_packet_size
max_packet_size = 128M
Ref: https://manual.manticoresearch.com/Server_settings/Searchd#max_packet_size
Advanced morphology
Lemmatization, stemming, word forms, etc.:
- https://manual.manticoresearch.com/Creating_an_index/NLP_and_tokenization/Morphology
- https://manual.manticoresearch.com/Creating_an_index/NLP_and_tokenization/Wordforms#Word-forms
Related links
- https://manticoresearch.com/about/
- https://dev.tiki.org/Manticore-Search
- https://gitlab.com/wikisuite/wikisuite-packages/-/tree/main/wikisuite-manticore/debian
- https://gitlab.com/tikiwiki/tiki/-/merge_requests/1805
- https://manticoresearch.com/blog/manticore-alternative-to-elasticsearch/
- https://roadmap.manticoresearch.com
- https://doc.tiki.org/Unified-Index-Comparison
- https://doc.tiki.org/Manticore-Search
- https://www.slideshare.net/SergeyNikolaev27/manticore-6pdf