Class ObjectFacadeSolrIndexingAspect
- java.lang.Object
-
- com.hybris.backoffice.search.aspects.AbstractObjectFacadeSearchIndexingAspect
-
- com.hybris.backoffice.solrsearch.aspects.ObjectFacadeSolrIndexingAspect
-
public class ObjectFacadeSolrIndexingAspect extends AbstractObjectFacadeSearchIndexingAspect
Contains logic of aspect responsible for updating solr index.
Shall be called when BackofficeObjectFacadeperforms changes onItemModel. This class uses underlyingSolrIndexSynchronizationStrategyto perform operations on solr index.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCONFIG_BACKOFFICE_SEARCH_BACKGROUND_SOLR_INDEXING_ENABLEDDetermines if solr indexing triggered for every indexed model change will be performed in non blocking operation - default: falsestatic java.lang.StringCONFIG_BACKOFFICE_SEARCH_REVERSE_CATEGORY_INDEX_LOOKUP_ENABLEDIn case when backoffice.search.reverse.category.index.lookup.enabled is set to true backoffice changes its behaviour for category-based search using explorer tree in product and assortment view.
-
Constructor Summary
Constructors Constructor Description ObjectFacadeSolrIndexingAspect()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.Map<java.lang.String,java.util.List<PK>>extractModels(org.aspectj.lang.JoinPoint joinPoint, java.lang.Object retVal)protected java.util.Optional<java.util.Set<PK>>extractProductsFromModifiedCategories(java.lang.Object model)protected java.util.Set<PK>findAllProductsInSubTree(CategoryModel cat)protected java.util.Set<PK>getProductPKsInCategory(CategoryModel cat)protected SolrIndexSynchronizationStrategygetSolrIndexSynchronizationStrategy()protected voidincludeRequiredProducts(org.aspectj.lang.JoinPoint joinPoint, java.util.Map<java.lang.String,java.util.List<PK>> result)protected booleanisBackgroundIndexingEnabled()protected booleanisReverseCategoryIndexLookupEnabled()protected voidlogDebug(java.util.Map.Entry<java.lang.String,java.util.List<PK>> entry)protected voidremoveIndexByPk(java.lang.String typecode, java.util.List<PK> pkList)voidsetSolrIndexSynchronizationStrategy(SolrIndexSynchronizationStrategy solrIndexSynchronizationStrategy)protected voidupdateIndexByPk(java.lang.String typecode, java.util.List<PK> pkList)-
Methods inherited from class com.hybris.backoffice.search.aspects.AbstractObjectFacadeSearchIndexingAspect
executeIndexer, extractModelsWithoutArgs, findBackgroundThread, getConfigurationService, getCurrentDateMinusOneMinute, getItemModificationHistoryService, getLastModifiedProductsPK, getLastSavedValuesForProducts, getModelService, getModifiedProductsPK, setConfigurationService, setItemModificationHistoryService, setModelService, updateChanged, updateRemoved, updateRemovedForMethodParameter
-
-
-
-
Field Detail
-
CONFIG_BACKOFFICE_SEARCH_REVERSE_CATEGORY_INDEX_LOOKUP_ENABLED
public static final java.lang.String CONFIG_BACKOFFICE_SEARCH_REVERSE_CATEGORY_INDEX_LOOKUP_ENABLED
In case when backoffice.search.reverse.category.index.lookup.enabled is set to true backoffice changes its behaviour for category-based search using explorer tree in product and assortment view. Standard behaviour (the setting set to false, which is the default) each time the user selects a category its sub-tree is sent to solr to perform search using all passed categories- See Also:
- Constant Field Values
-
CONFIG_BACKOFFICE_SEARCH_BACKGROUND_SOLR_INDEXING_ENABLED
public static final java.lang.String CONFIG_BACKOFFICE_SEARCH_BACKGROUND_SOLR_INDEXING_ENABLED
Determines if solr indexing triggered for every indexed model change will be performed in non blocking operation - default: false- See Also:
- Constant Field Values
-
-
Method Detail
-
extractModels
protected java.util.Map<java.lang.String,java.util.List<PK>> extractModels(org.aspectj.lang.JoinPoint joinPoint, java.lang.Object retVal)
- Overrides:
extractModelsin classAbstractObjectFacadeSearchIndexingAspect
-
removeIndexByPk
protected void removeIndexByPk(java.lang.String typecode, java.util.List<PK> pkList)- Specified by:
removeIndexByPkin classAbstractObjectFacadeSearchIndexingAspect
-
updateIndexByPk
protected void updateIndexByPk(java.lang.String typecode, java.util.List<PK> pkList)- Specified by:
updateIndexByPkin classAbstractObjectFacadeSearchIndexingAspect
-
logDebug
protected void logDebug(java.util.Map.Entry<java.lang.String,java.util.List<PK>> entry)
- Specified by:
logDebugin classAbstractObjectFacadeSearchIndexingAspect
-
includeRequiredProducts
protected void includeRequiredProducts(org.aspectj.lang.JoinPoint joinPoint, java.util.Map<java.lang.String,java.util.List<PK>> result)
-
isBackgroundIndexingEnabled
protected boolean isBackgroundIndexingEnabled()
- Overrides:
isBackgroundIndexingEnabledin classAbstractObjectFacadeSearchIndexingAspect
-
isReverseCategoryIndexLookupEnabled
protected boolean isReverseCategoryIndexLookupEnabled()
-
extractProductsFromModifiedCategories
protected java.util.Optional<java.util.Set<PK>> extractProductsFromModifiedCategories(java.lang.Object model)
-
findAllProductsInSubTree
protected java.util.Set<PK> findAllProductsInSubTree(CategoryModel cat)
-
getProductPKsInCategory
protected java.util.Set<PK> getProductPKsInCategory(CategoryModel cat)
-
getSolrIndexSynchronizationStrategy
protected SolrIndexSynchronizationStrategy getSolrIndexSynchronizationStrategy()
-
setSolrIndexSynchronizationStrategy
public void setSolrIndexSynchronizationStrategy(SolrIndexSynchronizationStrategy solrIndexSynchronizationStrategy)
-
-