Class TurLuceneInstanceProcess

java.lang.Object
com.viglet.turing.lucene.TurLuceneInstanceProcess

@Component public class TurLuceneInstanceProcess extends Object
Creates and caches TurLuceneInstance objects per index path. Mirrors TurSolrInstanceProcess for the Lucene engine.
Since:
2026.1
Author:
Alexandre Oliveira
  • Constructor Details

  • Method Details

    • initLuceneInstance

      public Optional<TurLuceneInstance> initLuceneInstance(String siteName, Locale locale)
      Initialises (or returns a cached) Lucene instance for the given site + locale.
    • initLuceneInstance

      public Optional<TurLuceneInstance> initLuceneInstance(TurSEInstance turSEInstance, String coreName)
      Initialises (or returns a cached) Lucene instance for the given SE instance + core name.
    • initLuceneInstance

      public Optional<TurLuceneInstance> initLuceneInstance(TurSNSiteLocale turSNSiteLocale)
    • evict

      public void evict(String basePath, String coreName)
      Evicts a cached instance (e.g. after a core is deleted).
    • resetInstance

      public void resetInstance(Path indexPath)
      Closes and evicts the cached instance for indexPath, then deletes the index directory. The next call to initLuceneInstance will recreate a fresh empty index. Used to recover from Lucene schema conflicts.
    • shutdown

      @PreDestroy public void shutdown()