I have migrated from embedded Solr to a remote Solr instance. Accordingly there are “orphaned” Solr files left over in the permanent directory.
- Is it safe to remove all directories named
solr
from the permanent directory?
- Are there any other “orphaned” files from the embedded Solr instance that I can remove?
Thanks!
Bill
Embedded Solr files are located in two folders:
-
<permdir>/store/solr
: that’s the Solr home which contain the configuration and data of several unrecoverable cores
-
<permdir>/cache/solr
: that’s the location where are stored the core’s data which can be regenerated when deleted (extension search index and document search index)
2 Likes
Thank you @tmortagne.
What does ‘unrecoverable cores’ mean?
The opposite of “can be regenerated when deleted”. Those data only exist in those cores and if you delete them it’s lost.
Thank you @tmortagne !
How does the data in unrecoverable cores get there if it is not automatically generated?
Are the “unrecoverable” cores the same as the ones we have to manually set up (if we use external Solr instance) as documented here:
http://extensions.xwiki.org/xwiki/bin/view/Extension/Solr%20Search%20API
(in section “Setup a remote Solr server”)
Thanks!
Bill
Solr cores are basically databases. Some modules use cores to store data from somewhere else in a more search friendly manner, and others are using cores are the main database. Solr does not magically index stuff stored somewhere else, you still have code which store stuff in Solr using the API.
You have to manually setup all the cores used by XWiki, recoverable or not. Note that if you are on Debian there is packages which does all that for you.
I set up remote Solr for XWiki (I use 8.1.1 to prevent slow stop of service as you already know about). Remote Solr instance uses different directory than XWiki permanent directory. Does this mean all Solr activity by XWiki will be in separate Solr directory, or will Solr files still appear inside XWiki permanent directory?
What you have in permanent directory are embedded Solr stuff. If you use a remote Solr instance, then there is nothing on XWiki side anymore (that’s actually one of the main points
).