Class BaseLuceneProcessor
java.lang.Object
com.softslate.commerce.businessobjects.core.BaseBusinessObject
com.softslate.commerce.businessobjects.core.BaseBusinessProcessor
com.softslate.commerce.businessobjects.product.BaseLuceneProcessor
- All Implemented Interfaces:
BusinessObject,BusinessProcessor
- Direct Known Subclasses:
BasicLuceneFacetHelper,BasicLuceneIndexer,BasicLuceneSearcher,BasicLuceneSuggestionsIndexer
Abstract class holding methods common to both indexing and searching with
Lucene.
- Author:
- Jason McWilliams, David Tobey
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final DecimalFormatstatic Fileprivate static org.apache.lucene.facet.taxonomy.TaxonomyReaderstatic Fileprivate static org.apache.lucene.search.IndexSearcher(package private) static org.apache.commons.logging.Logstatic Fileprivate static org.apache.lucene.search.IndexSearcher -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidcopyNewIndexFilesIntoPlace(File indexDir, String newIndexSubdirectory, String oldIndexSubdirectory) org.apache.lucene.analysis.Analyzerorg.apache.lucene.analysis.Analyzerstatic Filestatic org.apache.lucene.facet.taxonomy.TaxonomyReaderstatic Filestatic org.apache.lucene.search.IndexSearcherstatic Filestatic org.apache.lucene.search.IndexSearcherinitFacetIndexDir(String indexParam) initIndexDir(String indexParam) initSuggestionsIndexDir(String indexParam) protected booleanprotected booleanstatic Stringpad(int i) static Stringprotected StringpruneArticlesFromName(String name) voidrestoreBackedUpIndexFiles(String oldIndexSubdirectory) textFormat(Object i) Methods inherited from class com.softslate.commerce.businessobjects.core.BaseBusinessProcessor
formatDateTime, formatPrice, getAppComponents, getAppSettings, getAttributeIDs, getBusinessObjectFactory, getDaoFactory, getEventBus, getInjector, getProductIDs, getSettings, getUser, initialize, isProcessorClassActive, loadMatchingSkus, parseDateTime, parseResponseData, prepareRequestData, sendHTTPGet, sendHTTPPost, sendHTTPPost, setAppComponents, setAppSettings, setBusinessObjectFactory, setDaoFactory, setEventBus, setInjector, setSettings, setUser, updateOrderTotals, updateOrderTotals, updateOrderTotals, utils
-
Field Details
-
log
static org.apache.commons.logging.Log log -
indexDir
-
facetIndexDir
-
suggestionsIndexDir
-
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
-
getIndexDir
-
initFacetIndexDir
-
getFacetIndexDir
-
initSuggestionsIndexDir
-
getSuggestionsIndexDir
-
getIndexSearcher
- Throws:
Exception
-
getFacetReader
- Throws:
Exception
-
getSuggestionsSearcher
- Throws:
Exception
-
closeReaders
- Throws:
Exception
-
closeSuggestionsReader
- 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
- Throws:
Exception
-
pad
-
pad
-
pruneArticlesFromName
-
copyNewIndexFilesIntoPlace
public void copyNewIndexFilesIntoPlace(File indexDir, String newIndexSubdirectory, String oldIndexSubdirectory) throws ApplicationException - Throws:
ApplicationException
-
restoreBackedUpIndexFiles
- Throws:
ApplicationException
-