org.apache.solr.schema

Class ExternalFileFieldReloader

  • All Implemented Interfaces:
    SolrEventListener, NamedListInitializedPlugin


    public class ExternalFileFieldReloader
    extends AbstractSolrEventListener
    An event listener to reload ExternalFileFields for new searchers. Opening a new IndexSearcher will invalidate the internal caches used by ExternalFileField. By default, these caches are reloaded lazily by the first search that uses them. For large external files, this can slow down searches unacceptably. To reload the caches when the searcher is first opened, set up event listeners in your solrconfig.xml:
       <listener event="newSearcher" class="org.apache.solr.schema.ExternalFileFieldReloader"/>
       <listener event="firstSearcher" class="org.apache.solr.schema.ExternalFileFieldReloader"/>
     
    The caches will be reloaded for all ExternalFileFields in your schema after each commit.