Class BasicLuceneFacetHelper
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.BasicLuceneFacetHelper
- All Implemented Interfaces:
BusinessObject,BusinessProcessor,LuceneFacetHelper
Class responsible for searching on the Lucene index for facets.
- Author:
- David Tobey
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic char(package private) static org.apache.commons.logging.LogFields inherited from class com.softslate.commerce.businessobjects.product.BaseLuceneProcessor
facetIndexDir, indexDir, suggestionsIndexDir -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected MapcompileIncomingFacetsAsMap(String[] facets) org.apache.lucene.search.BooleanQuerycreateFacetsBooleanQuery(String[] facets) org.apache.lucene.facet.search.FacetsCollectorcreateFacetsCollector(SearchList searchList) private Stringprotected MaploadFacetCategories(Collection facetResultCollection, Map categoryMap) protected MaploadFacetCategories(org.apache.lucene.facet.search.results.FacetResultNode frn, Map facetCategories, Map categoryMap) loadFacetCategoriesAndManufacturers(SearchList searchList) loadFacetManufacturersFromDatabase(Collection facetResultCollection) voidlogFacetResults(Collection facetResultCollection) performFacetSearch(org.apache.lucene.search.Query query, SearchList searchList, org.apache.lucene.search.IndexSearcher searcher) protected MapsimplifyFacetResultNode(org.apache.lucene.facet.search.results.FacetResultNode frn) protected MapsimplifyFacetResultNodeAsMap(org.apache.lucene.facet.search.results.FacetResultNode frn) simplifyFacetResults(Collection facetResults) simplifyFacetResultsAsMap(Collection facetResults) protected CollectionsimplifyFacetSubResults(Iterable facetSubResults) protected MapsimplifyFacetSubResultsAsMap(Iterable facetSubResults) protected StringsortByNaturalMatchedFromSetting(String facetGroupName) protected StringsortByNumericMatchedFromSetting(String facetGroupName) protected voidsortFacets(String facetName, Collection subResults) 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 -
FACET_SEPARATOR
public static char FACET_SEPARATOR
-
-
Constructor Details
-
BasicLuceneFacetHelper
public BasicLuceneFacetHelper()
-
-
Method Details
-
performFacetSearch
public Collection performFacetSearch(org.apache.lucene.search.Query query, SearchList searchList, org.apache.lucene.search.IndexSearcher searcher) throws Exception - Specified by:
performFacetSearchin interfaceLuceneFacetHelper- Throws:
Exception
-
simplifyFacetResults
- Specified by:
simplifyFacetResultsin interfaceLuceneFacetHelper
-
simplifyFacetResultNode
-
sortFacets
-
sortByNumericMatchedFromSetting
-
sortByNaturalMatchedFromSetting
-
simplifyFacetSubResults
-
simplifyFacetResultsAsMap
- Specified by:
simplifyFacetResultsAsMapin interfaceLuceneFacetHelper
-
simplifyFacetResultNodeAsMap
protected Map simplifyFacetResultNodeAsMap(org.apache.lucene.facet.search.results.FacetResultNode frn) -
simplifyFacetSubResultsAsMap
-
createFacetsBooleanQuery
- Specified by:
createFacetsBooleanQueryin interfaceLuceneFacetHelper
-
compileIncomingFacetsAsMap
-
createFacetsCollector
public org.apache.lucene.facet.search.FacetsCollector createFacetsCollector(SearchList searchList) throws Exception - Specified by:
createFacetsCollectorin interfaceLuceneFacetHelper- Throws:
Exception
-
loadFacetCategoriesAndManufacturers
- Specified by:
loadFacetCategoriesAndManufacturersin interfaceLuceneFacetHelper- Throws:
Exception
-
loadFacetCategories
protected Map loadFacetCategories(Collection facetResultCollection, Map categoryMap) throws Exception - Throws:
Exception
-
loadFacetCategories
protected Map loadFacetCategories(org.apache.lucene.facet.search.results.FacetResultNode frn, Map facetCategories, Map categoryMap) throws Exception - Throws:
Exception
-
loadFacetManufacturersFromDatabase
- Specified by:
loadFacetManufacturersFromDatabasein interfaceLuceneFacetHelper- Throws:
Exception
-
logFacetResults
- Specified by:
logFacetResultsin interfaceLuceneFacetHelper
-
escapeXML
-