I have several external file fields that get reloaded every hour. My solrconfig.xml has
<dataDir>${solr.data.basedir}/${solr.core.name}</dataDir>
and the external file field files are under this dir like external_*
. With Solr replication, I can only replicate the index and the config files. Is the only option to separately reload these files on the slaves and then call reloadCache
on all the slaves individually? Or can Solr replicate the external file fields files?
Solr is able to replicate the configuration files and the index.
Once the files are replicated, the Solr cores will be reloaded on the slaves and need not be done manually.
EDIT:-
The Location for the External files is the data folder which does get replicated.
Also for reloading the external files check link
Solr does not replicate ext file field files automatically, even if they are under the <dataDir>
specified in solrconfig.xml. To replicate these files, we need to specify them under confFiles
in the replication handler in solrconfig with relative paths.
My Solr conf dir (containing solrconfig.xml, synonyms.txt, etc.,) is at:
/var/solr/application-cores/List/conf
and my data dir containing the ext file field files is at:
/var/solr-data/List
so my confFiles looks like:
<str name="confFiles">solrconfig.xml,data-config.xml,schema.xml,stopwords.txt,synonyms.txt,elevate.xml,../../../../solr-data/List/external_eff_views</str>
No wild-cards are allowed, so I have to specify each ext file field file separately :-(.
Thanks to link pointed out by @Jayendra, I can have the ext file fields reloaded on the slave after replication since I have set up listeners in solrconfig.xml like:
<listener event="newSearcher" class="org.apache.solr.schema.ExternalFileFieldReloader"/>
<listener event="firstSearcher" class="org.apache.solr.schema.ExternalFileFieldReloader"/>