Solr - for Omeka, does directory location matter

For months (nay, more than a year now) I’ve been trying to solve the issue of a disappearing core in solr every time the server restarts. Well, I can now get a core to persist if I create it at command line, but the issue seems to be the location of the core when created in the admin console.

In short, I’m confused about directory structure and why the Omeka index that I inherited is located in the webapps folder and not the solr home folder under var. So for those of you using solr, can I ask: what is your current working directory (CWD) and where do you store your data/index files? See the screenshot here, this is what I think is causing all kinds of issues for us and I have no clue how to fix it. I can’t even find instructions online regarding where/how to change the CWD location…

This is the core that works with Omeka but the link to it does not persist on restart:

solr admin console

Every time solr or the server restarts, I have to recreate the Data and Index links… Otherwise it looks like the core has “disappeared.” (meaning it does not show in admin console and won’t work with the Omeka plug-in)

And according to everything I’ve seen/read online, this is where the locations of the data/index files should be… this is the core that persists. Note the CWD difference.

The location of the Solr home directory is probably defined by the solr.solr.home Java property. On the Solr Dashboard screen, look under JVM for the line that begins -Dsolr.solr.home= to find what it is currently set to. You may be able to change the startup script for Solr to alter the path to a different directory.

This is somewhat defined in this documentation, but there may be more information available elsewhere:
https://wiki.apache.org/solr/SolrInstall

1 Like

Thanks John! I actually think the main issue was just related to the copying of the index files… so I just decided to scrap it and instead do the following: create a totally new core with a slightly different name, at command line, in the correct location (which was listed as var/solr for the solr home) and then check to see it would persist on a restart. Then I copied the conf files from the old core location into the new one, reloaded them in the admin console, and went back to Omeka to reindex. That worked fine and without any issues. But copying over index files - despite everything written online and in the solr user group I joined - simply did not work.

This topic was automatically closed after 250 days. New replies are no longer allowed.