Elasticsearch integration for live helper chat to boost statistic generation.
Switch branches/tags
Nothing to show
Clone or download
Latest commit 80df908 Nov 5, 2018



Remigijus Kiminas, Live Helper Chat


This plugin enables statistic generation using only Elastic Search. MySQL is not a good solution for statistic generation, but Elastic Search does great job on that.

  • Eliminates MySQL Queries in statistic genreation
  • Allows to search withing messages with keyword
  • Allows to generate Online Operators/Active/Pending chat's chart

See image

How it works?

  • After chat close event chat is indexed within cronjob.
  • Also there is cronjob which indexes existing data.

Future plans

  • Remove older chat's than 3 months and implement fallback if record is not found in MySQL. At the moment we just duplicate records.


  1. Put elasticsearch folder in extensions folder.
  2. copy settings.ini.default.php to settings.ini.php and edit settings
  3. Activate extension in settings/settings.ini.php file
  4. Go to back office and clear cache.
  5. Go to Modules -> Elastic Search
  6. Click create index and later update structure
  7. Execute doc/install.sql

Indexing existing chats

php cron.php -s site_admin -e elasticsearch -c cron/index_chats

Indexing existing messages

php cron.php -s site_admin -e elasticsearch -c cron/index_msg

Indexing existing online sessions

php cron.php -s site_admin -e elasticsearch -c cron/index_os

Setup automatic indexing [Required]

*/5 * * * * cd /home/www/lhc && php cron.php -s site_admin -e elasticsearch -c cron/cron > log_index.txt /dev/null 2>&1

Used to generate online operators/Active/Pending chat's chart [Optional]

* * * * * cd /home/www/lhc && php cron.php -s site_admin -e elasticsearch -c cron/cron_1m > cron_1m.txt /dev/null 2>&1