Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-85080

More error output on solr indexer when ExtractingRequestHandler is missing

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 5.0
    • Global search
    • MOODLE_500_STABLE
    • MDL-85080-main
    • Hide

      Preparations

      1. Have a running Moodle (cn be empry or contain little content).
      2. Have a Solr instance that has a index configured that can be used for Moodle.
      3. In Moodle configure the solr instance to be used for the search i.e. https://moodle.examle/admin/settings.php?section=searchsolr the solr is configured and in https://moodle.example/admin/settings.php?section=manageglobalsearch the solr is used for the global search.
      4. In a random course add a file activity and upload a PDF file (that should be indexed later).

      First step (mis)configure solr

      1. In your solr instance change the configuration and remove the file handler ExtractingRequestHandler is and verify this by running

      curl -i -XPOST "http://localhost:8983/solr/moodle/update/extract"

      which should return a http 404 response.

      2. In Moodle, empty the solr index (best done with the button at https://moodle.example/admin/searchareas.php).

      3. On the console run the indexer:

      sudo -u www-data /usr/bin/php search/cli/indexer.php --reindex 

       

      Expected output should be something like:

      HTTP error 404 while indexing file with document id mod_resource-activity-1339650-solrfile48834801, request url was http://localhost:8983/solr/moodle/update/extract

      Fix solr configuratation

      1. In your Solr instance add the file request handler ExtractingRequestHandler and restart the solr. The request

      curl -i -XPOST "http://localhost:8983/solr/moodle/update/extract"

      should return a http code 2xx but a solr error (missing parameters)

      2. In Moodle empty the Solr index again.

      3. On the console run the indexer:

      sudo -u www-data /usr/bin/php search/cli/indexer.php --reindex 

      Expected output: none there should not appear any error.

      Show
      Preparations Have a running Moodle (cn be empry or contain little content). Have a Solr instance that has a index configured that can be used for Moodle. In Moodle configure the solr instance to be used for the search i.e. https://moodle.examle/admin/settings.php?section=searchsolr the solr is configured and in https://moodle.example/admin/settings.php?section=manageglobalsearch the solr is used for the global search. In a random course add a file activity and upload a PDF file (that should be indexed later). First step (mis)configure solr 1. In your solr instance change the configuration and remove the file handler ExtractingRequestHandler is and verify this by running curl -i -XPOST "http://localhost:8983/solr/moodle/update/extract" which should return a http 404 response. 2. In Moodle, empty the solr index (best done with the button at https://moodle.example/admin/searchareas.php). 3. On the console run the indexer: sudo -u www-data /usr/bin/php search/cli/indexer.php --reindex   Expected output should be something like: HTTP error 404 while indexing file with document id mod_resource-activity- 1339650 -solrfile48834801, request url was http: //localhost:8983/solr/moodle/update/extract Fix solr configuratation 1. In your Solr instance add the file request handler ExtractingRequestHandler and restart the solr. The request curl -i -XPOST "http://localhost:8983/solr/moodle/update/extract" should return a http code 2xx but a solr error (missing parameters) 2. In Moodle empty the Solr index again. 3. On the console run the indexer: sudo -u www-data /usr/bin/php search/cli/indexer.php --reindex Expected output: none there should not appear any error.
    • Hide

      Code verified against automated checks.

      Checked MDL-85080 using repository: https://github.com/srobotta/moodle

      More information about this report

      Built on: Mon Apr 7 08:26:26 UTC 2025

      Show
      Code verified against automated checks. Checked MDL-85080 using repository: https://github.com/srobotta/moodle main (0 errors / 0 warnings) [branch: MDL-85080-main | CI Job ] More information about this report Built on: Mon Apr 7 08:26:26 UTC 2025

      While running search/cli/indexer.php I got a lot of error messages at the console like:

      Error while indexing file with document id mod_folder-activity-84537-solrfile16720542 

      I would like to have some more information on the error, e.g. the http error.

            strobotta Stephan Robotta
            strobotta Stephan Robotta
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.