Class BaseLuceneProcessor

All Implemented Interfaces:
BusinessObject, BusinessProcessor
Direct Known Subclasses:
BasicLuceneFacetHelper, BasicLuceneIndexer, BasicLuceneSearcher, BasicLuceneSuggestionsIndexer

public abstract class BaseLuceneProcessor extends BaseBusinessProcessor
Abstract class holding methods common to both indexing and searching with Lucene.
Author:
Jason McWilliams, David Tobey
  • Field Details

    • log

      static org.apache.commons.logging.Log log
    • indexDir

      public static File indexDir
    • facetIndexDir

      public static File facetIndexDir
    • suggestionsIndexDir

      public static File suggestionsIndexDir
    • doubleFormat

      private static final DecimalFormat doubleFormat
    • indexSearcher

      private static org.apache.lucene.search.IndexSearcher indexSearcher
    • facetReader

      private static org.apache.lucene.facet.taxonomy.TaxonomyReader facetReader
    • suggestionsSearcher

      private static org.apache.lucene.search.IndexSearcher suggestionsSearcher
  • Constructor Details

    • BaseLuceneProcessor

      public BaseLuceneProcessor()
  • Method Details

    • initIndexDir

      public File initIndexDir(String indexParam)
    • getIndexDir

      public static File getIndexDir()
    • initFacetIndexDir

      public File initFacetIndexDir(String indexParam)
    • getFacetIndexDir

      public static File getFacetIndexDir()
    • initSuggestionsIndexDir

      public File initSuggestionsIndexDir(String indexParam)
    • getSuggestionsIndexDir

      public static File getSuggestionsIndexDir()
    • getIndexSearcher

      public static org.apache.lucene.search.IndexSearcher getIndexSearcher() throws Exception
      Throws:
      Exception
    • getFacetReader

      public static org.apache.lucene.facet.taxonomy.TaxonomyReader getFacetReader() throws Exception
      Throws:
      Exception
    • getSuggestionsSearcher

      public static org.apache.lucene.search.IndexSearcher getSuggestionsSearcher() throws Exception
      Throws:
      Exception
    • closeReaders

      public void closeReaders() throws Exception
      Throws:
      Exception
    • closeSuggestionsReader

      public void closeSuggestionsReader() throws Exception
      Throws:
      Exception
    • createAnalyzer

      public org.apache.lucene.analysis.Analyzer createAnalyzer()
    • createSuggestionsAnalyzer

      public org.apache.lucene.analysis.Analyzer createSuggestionsAnalyzer()
    • isFactedSearchEnabled

      protected boolean isFactedSearchEnabled()
    • isSuggestionsEnabled

      protected boolean isSuggestionsEnabled()
    • textFormat

      public String textFormat(Object i) throws Exception
      Throws:
      Exception
    • pad

      public static String pad(Double d)
    • pad

      public static String pad(int i)
    • pruneArticlesFromName

      protected String pruneArticlesFromName(String name)
    • copyNewIndexFilesIntoPlace

      public void copyNewIndexFilesIntoPlace(File indexDir, String newIndexSubdirectory, String oldIndexSubdirectory) throws ApplicationException
      Throws:
      ApplicationException
    • restoreBackedUpIndexFiles

      public void restoreBackedUpIndexFiles(String oldIndexSubdirectory) throws ApplicationException
      Throws:
      ApplicationException