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
FieldsModifier and TypeFieldDescription(package private) static org.apache.commons.logging.Logstatic final Stringstatic final Stringprivate org.apache.lucene.index.IndexWriterFields inherited from class com.softslate.commerce.businessobjects.product.BaseLuceneProcessor
facetIndexDir, indexDir, suggestionsIndexDir -
Constructor Summary
Constructors -
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.DocumentindexCategorySuggestion(Category category) org.apache.lucene.document.DocumentindexManufacturerSuggestion(Manufacturer manufacturer) org.apache.lucene.document.DocumentindexProductSuggestion(Product product) org.apache.lucene.index.IndexWriterinitSuggestionsWriter(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, textFormatMethods 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, utilsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.softslate.commerce.businessobjects.core.BusinessObject
initializeMethods 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:
reindexin 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
-