Class BasicLuceneSuggestionsIndexer
java.lang.Object
com.softslate.commerce.businessobjects.core.BaseBusinessObject
com.softslate.commerce.businessobjects.core.BaseBusinessProcessor
com.softslate.commerce.businessobjects.product.BaseLuceneProcessor
com.softslate.commerce.businessobjects.product.BasicLuceneSuggestionsIndexer
- All Implemented Interfaces:
BusinessObject
,BusinessProcessor
,LuceneSuggestionsIndexer
public class BasicLuceneSuggestionsIndexer
extends BaseLuceneProcessor
implements LuceneSuggestionsIndexer
Class responsible for creating the Lucene Suggestions index for advanced search functionality.
- Author:
- David Tobey
-
Field Summary
Modifier and TypeFieldDescription(package private) static org.apache.commons.logging.Log
static final String
static final String
private org.apache.lucene.index.IndexWriter
Fields inherited from class com.softslate.commerce.businessobjects.product.BaseLuceneProcessor
facetIndexDir, indexDir, suggestionsIndexDir
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddAllCategories
(org.apache.lucene.index.IndexWriter suggestionsWriter) addAllManufacturers
(org.apache.lucene.index.IndexWriter suggestionsWriter) addAllProducts
(org.apache.lucene.index.IndexWriter suggestionsWriter) org.apache.lucene.document.Document
indexCategorySuggestion
(Category category) org.apache.lucene.document.Document
indexManufacturerSuggestion
(Manufacturer manufacturer) org.apache.lucene.document.Document
indexProductSuggestion
(Product product) org.apache.lucene.index.IndexWriter
initSuggestionsWriter
(File indexDir, boolean resetIndex) Methods inherited from class com.softslate.commerce.businessobjects.product.BaseLuceneProcessor
closeReaders, closeSuggestionsReader, copyNewIndexFilesIntoPlace, createAnalyzer, createSuggestionsAnalyzer, getFacetIndexDir, getFacetReader, getIndexDir, getIndexSearcher, getSuggestionsIndexDir, getSuggestionsSearcher, initFacetIndexDir, initIndexDir, initSuggestionsIndexDir, isFactedSearchEnabled, isSuggestionsEnabled, pad, pad, pruneArticlesFromName, restoreBackedUpIndexFiles, textFormat
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
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.softslate.commerce.businessobjects.core.BusinessObject
initialize
Methods inherited from interface com.softslate.commerce.businessobjects.core.BusinessProcessor
getAppComponents, getAppSettings, getBusinessObjectFactory, getDaoFactory, getEventBus, getInjector, getSettings, getUser, setAppComponents, setAppSettings, setBusinessObjectFactory, setDaoFactory, setEventBus, setInjector, setSettings, setUser, utils
-
Field Details
-
log
static org.apache.commons.logging.Log log -
suggestionsWriter
private org.apache.lucene.index.IndexWriter suggestionsWriter -
newIndexSubdirectory
- See Also:
-
oldIndexSubdirectory
- See Also:
-
-
Constructor Details
-
BasicLuceneSuggestionsIndexer
public BasicLuceneSuggestionsIndexer()
-
-
Method Details
-
reindex
- Specified by:
reindex
in interfaceLuceneSuggestionsIndexer
- Throws:
Exception
-
initSuggestionsWriter
public org.apache.lucene.index.IndexWriter initSuggestionsWriter(File indexDir, boolean resetIndex) throws Exception - Throws:
Exception
-
addAllProducts
- Throws:
Exception
-
indexProductSuggestion
- Throws:
Exception
-
addAllCategories
- Throws:
Exception
-
indexCategorySuggestion
public org.apache.lucene.document.Document indexCategorySuggestion(Category category) throws Exception - Throws:
Exception
-
addAllManufacturers
public Map addAllManufacturers(org.apache.lucene.index.IndexWriter suggestionsWriter) throws Exception - Throws:
Exception
-
indexManufacturerSuggestion
public org.apache.lucene.document.Document indexManufacturerSuggestion(Manufacturer manufacturer) throws Exception - Throws:
Exception
-