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
Modifier and TypeFieldDescriptionprivate static final DecimalFormat
static File
private static org.apache.lucene.facet.taxonomy.TaxonomyReader
static File
private static org.apache.lucene.search.IndexSearcher
(package private) static org.apache.commons.logging.Log
static File
private static org.apache.lucene.search.IndexSearcher
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
void
copyNewIndexFilesIntoPlace
(File indexDir, String newIndexSubdirectory, String oldIndexSubdirectory) org.apache.lucene.analysis.Analyzer
org.apache.lucene.analysis.Analyzer
static File
static org.apache.lucene.facet.taxonomy.TaxonomyReader
static File
static org.apache.lucene.search.IndexSearcher
static File
static org.apache.lucene.search.IndexSearcher
initFacetIndexDir
(String indexParam) initIndexDir
(String indexParam) initSuggestionsIndexDir
(String indexParam) protected boolean
protected boolean
static String
pad
(int i) static String
protected String
pruneArticlesFromName
(String name) void
restoreBackedUpIndexFiles
(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
-