** Changed in: mahara
       Status: New => Confirmed

** Changed in: mahara
   Importance: Undecided => Medium

** Tags added: search

** Tags removed: search
** Tags added: elasticsearch

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: mahara-contributors
https://bugs.launchpad.net/bugs/1970373

Title:
  Elasticsearch 7 + MySQL8 - Cron does not reindex site with image
  description

Status in Mahara:
  Confirmed

Bug description:
  Internal Catalyst reference: This bug is related to line 29 on the
  Elasticsearch testing spreadsheet on Alfresco.

  MySQL8+Firefox on main

  To replicate:
  1. Enable Elasticsearch 7, select all artefact types, save settings and index 
the site
  2. Upload a new image with a unique one word in its description and place it 
on a page. Share the page with PersonA
  3. Let the index run / run cron
  4. Masquerade as PersonA
  5. Search by the unique word in the image description

  Expected:
   - Page that the image has been added to should appear when searching by a 
key word in its description

  Actual:
   - No results

  Further notes:
  It seems the problem is that the index is not being updated when running 
cron. I get this error output when using MySQL:

  [INF] 0f (lib/cron.php:55) ---------- cron running Sun, 01 May 2022 22:23:44 
+0000 ----------
  [INF] 0f (lib/cron.php:114) Running PluginSearchElasticsearch::cron
  [INF] 0f (lib/cron.php:114) Running PluginSearchElasticsearch7::cron
  [WAR] 0f 
(lib/elasticsearch/guzzlehttp/ringphp/src/Client/CurlFactory.php:363) 
"continue" targeting switch is equivalent to "break". Did you mean to use 
"continue 2"?
  Call stack (most recent first):
    * log_message(""continue" targeting switch is equivalent to "brea...", 8, 
true, true, "/home/diannetennent/code/mahara/htdocs/lib/elastic...", 363) at 
/home/diannetennent/code/mahara/htdocs/lib/errors.php:515
    * error(2, ""continue" targeting switch is equivalent to "brea...", 
"/home/diannetennent/code/mahara/htdocs/lib/elastic...", 363, array(size 1)) at 
/home/diannetennent/code/mahara/htdocs/module/submissions/vendor/composer/ClassLoader.php:444
    * include() at 
/home/diannetennent/code/mahara/htdocs/module/submissions/vendor/composer/ClassLoader.php:444
    * 
Composer\Autoload\includeFile("/home/diannetennent/code/mahara/htdocs/lib/elastic...")
 at 
/home/diannetennent/code/mahara/htdocs/module/submissions/vendor/composer/ClassLoader.php:322
    * 
Composer\Autoload\ClassLoader->loadClass("GuzzleHttp\Ring\Client\CurlFactory") 
at Unknown:0
    * spl_autoload_call("GuzzleHttp\Ring\Client\CurlFactory") at 
/home/diannetennent/code/mahara/htdocs/lib/elasticsearch/guzzlehttp/ringphp/src/Client/CurlHandler.php:45
    * GuzzleHttp\Ring\Client\CurlHandler->__construct(array(size 0)) at 
/home/diannetennent/code/mahara/htdocs/lib/elasticsearch/elasticsearch/elasticsearch/src/Elasticsearch/ClientBuilder.php:225
    * Elasticsearch\ClientBuilder::defaultHandler() at 
/home/diannetennent/code/mahara/htdocs/lib/elasticsearch/elasticsearch/elasticsearch/src/Elasticsearch/ClientBuilder.php:507
    * Elasticsearch\ClientBuilder->build() at 
/home/diannetennent/code/mahara/htdocs/search/elasticsearch7/lib/PluginSearchElasticsearch7.php:1896
    * PluginSearchElasticsearch7::make_client("write") at 
/home/diannetennent/code/mahara/htdocs/search/elasticsearch7/lib/PluginSearchElasticsearch7.php:1380
    * PluginSearchElasticsearch7::index_queued_items() at 
/home/diannetennent/code/mahara/htdocs/search/elasticsearch7/lib/PluginSearchElasticsearch7.php:1291
    * PluginSearchElasticsearch7::cron() at 
/home/diannetennent/code/mahara/htdocs/lib/mahara.php:1914
    * call_static_method("PluginSearchElasticsearch7", "cron") at 
/home/diannetennent/code/mahara/htdocs/lib/cron.php:122

  [WAR] 0f 
(lib/elasticsearch/guzzlehttp/ringphp/src/Client/CurlFactory.php:382) 
"continue" targeting switch is equivalent to "break". Did you mean to use 
"continue 2"?
  Call stack (most recent first):
    * log_message(""continue" targeting switch is equivalent to "brea...", 8, 
true, true, "/home/diannetennent/code/mahara/htdocs/lib/elastic...", 382) at 
/home/diannetennent/code/mahara/htdocs/lib/errors.php:515
    * error(2, ""continue" targeting switch is equivalent to "brea...", 
"/home/diannetennent/code/mahara/htdocs/lib/elastic...", 382, array(size 1)) at 
/home/diannetennent/code/mahara/htdocs/module/submissions/vendor/composer/ClassLoader.php:444
    * include() at 
/home/diannetennent/code/mahara/htdocs/module/submissions/vendor/composer/ClassLoader.php:444
    * 
Composer\Autoload\includeFile("/home/diannetennent/code/mahara/htdocs/lib/elastic...")
 at 
/home/diannetennent/code/mahara/htdocs/module/submissions/vendor/composer/ClassLoader.php:322
    * 
Composer\Autoload\ClassLoader->loadClass("GuzzleHttp\Ring\Client\CurlFactory") 
at Unknown:0
    * spl_autoload_call("GuzzleHttp\Ring\Client\CurlFactory") at 
/home/diannetennent/code/mahara/htdocs/lib/elasticsearch/guzzlehttp/ringphp/src/Client/CurlHandler.php:45
    * GuzzleHttp\Ring\Client\CurlHandler->__construct(array(size 0)) at 
/home/diannetennent/code/mahara/htdocs/lib/elasticsearch/elasticsearch/elasticsearch/src/Elasticsearch/ClientBuilder.php:225
    * Elasticsearch\ClientBuilder::defaultHandler() at 
/home/diannetennent/code/mahara/htdocs/lib/elasticsearch/elasticsearch/elasticsearch/src/Elasticsearch/ClientBuilder.php:507
    * Elasticsearch\ClientBuilder->build() at 
/home/diannetennent/code/mahara/htdocs/search/elasticsearch7/lib/PluginSearchElasticsearch7.php:1896
    * PluginSearchElasticsearch7::make_client("write") at 
/home/diannetennent/code/mahara/htdocs/search/elasticsearch7/lib/PluginSearchElasticsearch7.php:1380
    * PluginSearchElasticsearch7::index_queued_items() at 
/home/diannetennent/code/mahara/htdocs/search/elasticsearch7/lib/PluginSearchElasticsearch7.php:1291
    * PluginSearchElasticsearch7::cron() at 
/home/diannetennent/code/mahara/htdocs/lib/mahara.php:1914
    * call_static_method("PluginSearchElasticsearch7", "cron") at 
/home/diannetennent/code/mahara/htdocs/lib/cron.php:122

  [INF] 0f (search/elasticsearch7/lib/PluginSearchElasticsearch7.php:1411)   12 
documents to index in bulk...
  [INF] 0f (search/elasticsearch7/lib/PluginSearchElasticsearch7.php:1588) 
Processing: view with process_bulk_insertions()
  [INF] 0f (search/elasticsearch7/lib/PluginSearchElasticsearch7.php:1588) 
Processing: usr with process_bulk_insertions()
  [INF] 0f (search/elasticsearch7/lib/PluginSearchElasticsearch7.php:1588) 
Processing: block_instance with process_bulk_insertions()
  [INF] 0f (search/elasticsearch7/lib/PluginSearchElasticsearch7.php:1644)     
batches: 3; records: 12; errors: 0

  But if I hit the 'reset all indexes' button, I do get results.

  With Postgres, I DO get results when running cron to reindex the site,
  but I do also get this error output:

  [INF] 9f (lib/cron.php:55) ---------- cron running Sun, 01 May 2022 22:31:58 
+0000 ----------
  [INF] 9f (lib/cron.php:114) Running PluginAuthSaml::auth_saml_refresh_cron
  [INF] 9f (lib/cron.php:114) Running PluginSearchElasticsearch::cron
  [INF] 9f (lib/cron.php:114) Running PluginSearchElasticsearch7::cron
  [WAR] 9f 
(lib/elasticsearch/guzzlehttp/ringphp/src/Client/CurlFactory.php:363) 
"continue" targeting switch is equivalent to "break". Did you mean to use 
"continue 2"?
  Call stack (most recent first):
    * log_message(""continue" targeting switch is equivalent to "brea...", 8, 
true, true, "/home/diannetennent/code/mahara/htdocs/lib/elastic...", 363) at 
/home/diannetennent/code/mahara/htdocs/lib/errors.php:515
    * error(2, ""continue" targeting switch is equivalent to "brea...", 
"/home/diannetennent/code/mahara/htdocs/lib/elastic...", 363, array(size 1)) at 
/home/diannetennent/code/mahara/htdocs/module/submissions/vendor/composer/ClassLoader.php:444
    * include() at 
/home/diannetennent/code/mahara/htdocs/module/submissions/vendor/composer/ClassLoader.php:444
    * 
Composer\Autoload\includeFile("/home/diannetennent/code/mahara/htdocs/lib/elastic...")
 at 
/home/diannetennent/code/mahara/htdocs/module/submissions/vendor/composer/ClassLoader.php:322
    * 
Composer\Autoload\ClassLoader->loadClass("GuzzleHttp\Ring\Client\CurlFactory") 
at Unknown:0
    * spl_autoload_call("GuzzleHttp\Ring\Client\CurlFactory") at 
/home/diannetennent/code/mahara/htdocs/lib/elasticsearch/guzzlehttp/ringphp/src/Client/CurlHandler.php:45
    * GuzzleHttp\Ring\Client\CurlHandler->__construct(array(size 0)) at 
/home/diannetennent/code/mahara/htdocs/lib/elasticsearch/elasticsearch/elasticsearch/src/Elasticsearch/ClientBuilder.php:225
    * Elasticsearch\ClientBuilder::defaultHandler() at 
/home/diannetennent/code/mahara/htdocs/lib/elasticsearch/elasticsearch/elasticsearch/src/Elasticsearch/ClientBuilder.php:507
    * Elasticsearch\ClientBuilder->build() at 
/home/diannetennent/code/mahara/htdocs/search/elasticsearch7/lib/PluginSearchElasticsearch7.php:1896
    * PluginSearchElasticsearch7::make_client("write") at 
/home/diannetennent/code/mahara/htdocs/search/elasticsearch7/lib/PluginSearchElasticsearch7.php:1380
    * PluginSearchElasticsearch7::index_queued_items() at 
/home/diannetennent/code/mahara/htdocs/search/elasticsearch7/lib/PluginSearchElasticsearch7.php:1291
    * PluginSearchElasticsearch7::cron() at 
/home/diannetennent/code/mahara/htdocs/lib/mahara.php:1914
    * call_static_method("PluginSearchElasticsearch7", "cron") at 
/home/diannetennent/code/mahara/htdocs/lib/cron.php:122

  [WAR] 9f 
(lib/elasticsearch/guzzlehttp/ringphp/src/Client/CurlFactory.php:382) 
"continue" targeting switch is equivalent to "break". Did you mean to use 
"continue 2"?
  Call stack (most recent first):
    * log_message(""continue" targeting switch is equivalent to "brea...", 8, 
true, true, "/home/diannetennent/code/mahara/htdocs/lib/elastic...", 382) at 
/home/diannetennent/code/mahara/htdocs/lib/errors.php:515
    * error(2, ""continue" targeting switch is equivalent to "brea...", 
"/home/diannetennent/code/mahara/htdocs/lib/elastic...", 382, array(size 1)) at 
/home/diannetennent/code/mahara/htdocs/module/submissions/vendor/composer/ClassLoader.php:444
    * include() at 
/home/diannetennent/code/mahara/htdocs/module/submissions/vendor/composer/ClassLoader.php:444
    * 
Composer\Autoload\includeFile("/home/diannetennent/code/mahara/htdocs/lib/elastic...")
 at 
/home/diannetennent/code/mahara/htdocs/module/submissions/vendor/composer/ClassLoader.php:322
    * 
Composer\Autoload\ClassLoader->loadClass("GuzzleHttp\Ring\Client\CurlFactory") 
at Unknown:0
    * spl_autoload_call("GuzzleHttp\Ring\Client\CurlFactory") at 
/home/diannetennent/code/mahara/htdocs/lib/elasticsearch/guzzlehttp/ringphp/src/Client/CurlHandler.php:45
    * GuzzleHttp\Ring\Client\CurlHandler->__construct(array(size 0)) at 
/home/diannetennent/code/mahara/htdocs/lib/elasticsearch/elasticsearch/elasticsearch/src/Elasticsearch/ClientBuilder.php:225
    * Elasticsearch\ClientBuilder::defaultHandler() at 
/home/diannetennent/code/mahara/htdocs/lib/elasticsearch/elasticsearch/elasticsearch/src/Elasticsearch/ClientBuilder.php:507
    * Elasticsearch\ClientBuilder->build() at 
/home/diannetennent/code/mahara/htdocs/search/elasticsearch7/lib/PluginSearchElasticsearch7.php:1896
    * PluginSearchElasticsearch7::make_client("write") at 
/home/diannetennent/code/mahara/htdocs/search/elasticsearch7/lib/PluginSearchElasticsearch7.php:1380
    * PluginSearchElasticsearch7::index_queued_items() at 
/home/diannetennent/code/mahara/htdocs/search/elasticsearch7/lib/PluginSearchElasticsearch7.php:1291
    * PluginSearchElasticsearch7::cron() at 
/home/diannetennent/code/mahara/htdocs/lib/mahara.php:1914
    * call_static_method("PluginSearchElasticsearch7", "cron") at 
/home/diannetennent/code/mahara/htdocs/lib/cron.php:122

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1970373/+subscriptions


_______________________________________________
Mailing list: https://launchpad.net/~mahara-contributors
Post to     : mahara-contributors@lists.launchpad.net
Unsubscribe : https://launchpad.net/~mahara-contributors
More help   : https://help.launchpad.net/ListHelp

Reply via email to