Setting up Solr 7.7.X for Moodle 3.7.1

Setting up Solr 7.7.X for Moodle 3.7.1

by Stephen Bourget -
Number of replies: 4
Picture of Core developers Picture of Plugin developers Picture of Testers

Hi Moodlers,

I'm trying to set up Global search with Moodle 3.7.1.  I recently updated my server from Solr 6.6.1 (which was out of support) that used Java 1.8 (which is out of support) to use Solr 7.7.2. / Java 12.  I've installed Solr and I can access it using the webUI.  I've created the cores, but Moodle is having issues creating the schema.

It's generating the following stack trace:

Error creating the Solr schema: {$a}

More information about this error

Debug info:
Error code: errorcreatingschema
Stack trace:
  • line 303 of \search\engine\solr\classes\schema.php: moodle_exception thrown
  • line 208 of \search\engine\solr\classes\schema.php: call to search_solr\schema->validate_add_field_result()
  • line 119 of \search\engine\solr\classes\schema.php: call to search_solr\schema->add_fields()
  • line 55 of \search\engine\solr\setup_schema.php: call to search_solr\schema->setup()

Has anyone gotten Moodle to work with Solr 7.7.X?  Any suggestions on debugging this?

My environment is Apache / PHP 7.2 / Windows Server 2016

Average of ratings: -
In reply to Stephen Bourget

Re: Setting up Solr 7.7.X for Moodle 3.7.1

by esingh bss -

Hi,

I am having the exact same issue and my moodle and solr configurations are same as yours.

I renamed managed-schema to schema.xml.

But didn't get any luck did you found the solution?


In reply to Stephen Bourget

Re: Setting up Solr 7.7.X for Moodle 3.7.1

by Daniel Thies -
Picture of Core developers Picture of Plugin developers Picture of Testers

I had something similar. When I went to Site settings -> search -> Manage global search and looked at the list of steps, step three had a long message with a red background that said something about the schema. In the middle of the message there is a link. Clinking that linked fixed the issue and everything turned green.

In reply to Daniel Thies

Re: Setting up Solr 7.7.X for Moodle 3.7.1

by Stephen Bourget -
Picture of Core developers Picture of Plugin developers Picture of Testers
Unfortunately the problem I'm encountering is creating the schema. It's throwing the error i had listed above. It seems like there is some uncaught error since it's showing the placeholder in place of the error message.
In reply to Stephen Bourget

Re: Setting up Solr 7.7.X for Moodle 3.7.1

by Daniel Thies -
Picture of Core developers Picture of Plugin developers Picture of Testers

Yes, I think you have to go to yoursite/search/engine/solr/setup_schema.php. The message is misleading. It means setting up the schema has not been done yet.