We’re excited to have you join us! By registering, you’ll gain access to exclusive content, including leaked files and nulled software. Engage with our community, share your insights, and stay updated on the latest releases.

Get ready to explore and enjoy all the benefits of being a member, and feel free to connect with others through discussions and private messages.

Warning: Please do not create multiple accounts. We have a system in place that detects multiple account registrations, and any violations may result in a permanent ban.

Sign Up Now and Start Exploring!
  • License distribution for the
    Ibo 3.9 app+ panel with 17 themes to choose
    is now available for free, we are decrypting it now
    Only for VIP memberships

XenForo Elasticsearch ICU_plugin for Unicode accent-insensitive search

El Bana

Active member
Registered
Joined
Jul 25, 2024
Messages
142
I have been asked to share this with the community. These are my notes for using the ICU_plugin with Elasticsearch on Xenforo. In this, I create a separate "field" so that the normal XF index is left alone and this is added. It makes it easy for me to change from one to the other.

I am no expert. If anybody knows better, please comment. Also, if this fails, a reinstall of the Enhanced Search add-on will probably restore your search back to normal.

If anybody from XF looks at this, it would be nice to have the option of native support for the ICU_plugin so that none of this would be necessary for international users who want better accent-insensitive search.

Here are my notes:

I use CentOS 7. If you use some other flavor of linux, many things will be different. To do this, you are expected to have a high level of understanding or the ability to learn it.
Instructions are for ElasticSearch 7.6.

Install Elasticsearch, XF Enhanced Search plugin, get it working normally. Search must work at this point.
Admin Control Panel > Setup > Enhanced Search: If "Optimization required", click it and rebuild search indexes. Maybe turn off search first.


Install analysis-icu plugin:
Disable automatic upgrades of elasticsearch. The icu_plugin must be upgraded manually with each elasticsearch upgrade or it will cause problems.
- If you use yum-cron as I do, then disable elasticsearch from auto-upgrading:
vim /etc/yum/yum-cron.conf

# manually upgrade elasticsearch and analysis-icu plugin
exclude=elasticsearch*

systemctl restart yum-cron

install analysis-icu plugin:
/usr/share/elasticsearch/bin/elasticsearch-plugin install analysis-icu
systemctl start elasticsearch

#if upgrading elasticsearch, remove and reinstall:
/usr/share/elasticsearch/bin/elasticsearch-plugin remove analysis-icu
/usr/share/elasticsearch/bin/elasticsearch-plugin install analysis-icu
systemctl start elasticsearch

I use Kibana to edit elasticsearch. If you do, make sure that only your IP can access it.
You can also use curl, but Kibana's Console is easier for me.
service start kibana
wait a few minutes
go to Kibana>Dev Tools>Console
CSS:
Please, Log in or Register to view codes content!
Then rebuild indexes in the AdminCP.

edit:
vim src/addons/XFES/Search/Source/Elasticsearch.php



Code:
Please, Log in or Register to view codes content!

Test accent sensitivity / case folding. It should work now.

Going forward:

  • When upgrading Elasticsearch, you MUST also remove and re-install the ICU plugin. Don't forget.
  • In the Xenforo control panel, I believe you should never click "Optimize Now". (Correct me if you find that I'm wrong.)

Good luck and cheers!
 
Back
Top