Class TravelIndexer
java.lang.Object
de.hybris.platform.solrfacetsearch.indexer.impl.DefaultIndexer
de.hybris.platform.solrfacetsearch.indexer.impl.TravelIndexer
- All Implemented Interfaces:
de.hybris.platform.solrfacetsearch.indexer.spi.Indexer,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanFactoryAware
public class TravelIndexer
extends de.hybris.platform.solrfacetsearch.indexer.impl.DefaultIndexer
Overrides the DefaultIndexer class to include travel specific date based indexing
-
Field Summary
Fields inherited from class de.hybris.platform.solrfacetsearch.indexer.impl.DefaultIndexer
INDEXED_FIELDS_KEY, VALUE_PROVIDERS_KEY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddCommonFields(org.apache.solr.common.SolrInputDocument document, de.hybris.platform.solrfacetsearch.indexer.IndexerBatchContext batchContext, ItemModel model, Date documentDate) Add common fields.protected voidaddIndexedPropertyFields(de.hybris.platform.solrfacetsearch.indexer.spi.InputDocument document, de.hybris.platform.solrfacetsearch.indexer.IndexerBatchContext batchContext, ItemModel model, Date documentDate) Add indexed property fields.protected voidaddIndexedPropertyFieldsForNewDateBasedApi(de.hybris.platform.solrfacetsearch.indexer.spi.InputDocument document, de.hybris.platform.solrfacetsearch.indexer.IndexerBatchContext batchContext, ItemModel model, Collection<IndexedProperty> indexedProperties, String valueProviderId, DateBasedValueResolver<ItemModel> valueProvider, Date documentDate) Add indexed property fields for new date based api.org.apache.solr.common.SolrInputDocumentcreateInputDocument(ItemModel model, IndexConfig indexConfig, IndexedType indexedType, Collection<IndexedProperty> indexedProperties, Date documentDate) org.apache.solr.common.SolrInputDocumentcreateInputDocument(ItemModel model, IndexConfig indexConfig, IndexedType indexedType, Date documentDate) protected de.hybris.platform.catalog.CatalogVersionServiceprotected de.hybris.platform.servicelayer.config.ConfigurationServiceprotected de.hybris.platform.servicelayer.time.TimeServiceCollection<org.apache.solr.common.SolrInputDocument>indexItems(Collection<ItemModel> items, FacetSearchConfig facetSearchConfig, IndexedType indexedType) Collection<org.apache.solr.common.SolrInputDocument>indexItems(Collection<ItemModel> items, FacetSearchConfig facetSearchConfig, IndexedType indexedType, Collection<IndexedProperty> indexedProperties) protected booleanisRoomRateAvailableOnRatePlans(Collection<RatePlanConfigModel> ratePlanConfigs, Date currentDate) protected voidvoidsetCatalogVersionService(de.hybris.platform.catalog.CatalogVersionService catalogVersionService) voidsetConfigurationService(de.hybris.platform.servicelayer.config.ConfigurationService configurationService) voidsetTimeService(de.hybris.platform.servicelayer.time.TimeService timeService) Methods inherited from class de.hybris.platform.solrfacetsearch.indexer.impl.DefaultIndexer
addCommonFields, addIndexedPropertyFields, addIndexedPropertyFieldsForNewApi, addIndexedPropertyFieldsForOldApi, addIndexedTypeFields, addIndexedTypeFieldsForNewApi, addIndexedTypeFieldsForOldApi, createInputDocument, createInputDocument, createWrappedDocument, createWrappedDocumentForPartialUpdates, getBeanFactory, getExporter, getFieldNameProvider, getIdentityProvider, getIndexedFields, getIndexedFields, getIndexerBatchContextFactory, getModelService, getRangeNameProvider, getSolrSearchProviderFactory, getTypeService, getTypeValueProvider, getValueProviderSelectionStrategy, handleError, handleError, removeItemsByPk, resolveValueProviders, setBeanFactory, setFieldNameProvider, setIndexerBatchContextFactory, setModelService, setRangeNameProvider, setSolrSearchProviderFactory, setTypeService, setValueProviderSelectionStrategy, validateCommonRequiredParameters
-
Constructor Details
-
TravelIndexer
public TravelIndexer()
-
-
Method Details
-
indexItems
public Collection<org.apache.solr.common.SolrInputDocument> indexItems(Collection<ItemModel> items, FacetSearchConfig facetSearchConfig, IndexedType indexedType) throws de.hybris.platform.solrfacetsearch.indexer.exceptions.IndexerException, InterruptedException - Specified by:
indexItemsin interfacede.hybris.platform.solrfacetsearch.indexer.spi.Indexer- Overrides:
indexItemsin classde.hybris.platform.solrfacetsearch.indexer.impl.DefaultIndexer- Throws:
de.hybris.platform.solrfacetsearch.indexer.exceptions.IndexerExceptionInterruptedException
-
indexItems
public Collection<org.apache.solr.common.SolrInputDocument> indexItems(Collection<ItemModel> items, FacetSearchConfig facetSearchConfig, IndexedType indexedType, Collection<IndexedProperty> indexedProperties) throws de.hybris.platform.solrfacetsearch.indexer.exceptions.IndexerException, InterruptedException - Specified by:
indexItemsin interfacede.hybris.platform.solrfacetsearch.indexer.spi.Indexer- Overrides:
indexItemsin classde.hybris.platform.solrfacetsearch.indexer.impl.DefaultIndexer- Throws:
de.hybris.platform.solrfacetsearch.indexer.exceptions.IndexerExceptionInterruptedException
-
createInputDocument
public org.apache.solr.common.SolrInputDocument createInputDocument(ItemModel model, IndexConfig indexConfig, IndexedType indexedType, Date documentDate) throws de.hybris.platform.solrfacetsearch.config.exceptions.FieldValueProviderException - Throws:
de.hybris.platform.solrfacetsearch.config.exceptions.FieldValueProviderException
-
createInputDocument
public org.apache.solr.common.SolrInputDocument createInputDocument(ItemModel model, IndexConfig indexConfig, IndexedType indexedType, Collection<IndexedProperty> indexedProperties, Date documentDate) throws de.hybris.platform.solrfacetsearch.config.exceptions.FieldValueProviderException - Throws:
de.hybris.platform.solrfacetsearch.config.exceptions.FieldValueProviderException
-
addCommonFields
protected void addCommonFields(org.apache.solr.common.SolrInputDocument document, de.hybris.platform.solrfacetsearch.indexer.IndexerBatchContext batchContext, ItemModel model, Date documentDate) Add common fields.- Parameters:
document- the documentbatchContext- the batch contextmodel- the modeldocumentDate- the document date
-
addIndexedPropertyFields
protected void addIndexedPropertyFields(de.hybris.platform.solrfacetsearch.indexer.spi.InputDocument document, de.hybris.platform.solrfacetsearch.indexer.IndexerBatchContext batchContext, ItemModel model, Date documentDate) throws de.hybris.platform.solrfacetsearch.config.exceptions.FieldValueProviderException Add indexed property fields.- Parameters:
document- the documentbatchContext- the batch contextmodel- the modeldocumentDate- the document date- Throws:
de.hybris.platform.solrfacetsearch.config.exceptions.FieldValueProviderException- the field value provider exception
-
addIndexedPropertyFieldsForNewDateBasedApi
protected void addIndexedPropertyFieldsForNewDateBasedApi(de.hybris.platform.solrfacetsearch.indexer.spi.InputDocument document, de.hybris.platform.solrfacetsearch.indexer.IndexerBatchContext batchContext, ItemModel model, Collection<IndexedProperty> indexedProperties, String valueProviderId, DateBasedValueResolver<ItemModel> valueProvider, Date documentDate) throws de.hybris.platform.solrfacetsearch.config.exceptions.FieldValueProviderException Add indexed property fields for new date based api.- Parameters:
document- the documentbatchContext- the batch contextmodel- the modelindexedProperties- the indexed propertiesvalueProviderId- the value provider idvalueProvider- the value providerdocumentDate- the document date- Throws:
de.hybris.platform.solrfacetsearch.config.exceptions.FieldValueProviderException- the field value provider exception
-
logDebug
-
isRoomRateAvailableOnRatePlans
protected boolean isRoomRateAvailableOnRatePlans(Collection<RatePlanConfigModel> ratePlanConfigs, Date currentDate) -
getTimeService
protected de.hybris.platform.servicelayer.time.TimeService getTimeService() -
setTimeService
public void setTimeService(de.hybris.platform.servicelayer.time.TimeService timeService) -
getCatalogVersionService
protected de.hybris.platform.catalog.CatalogVersionService getCatalogVersionService() -
setCatalogVersionService
public void setCatalogVersionService(de.hybris.platform.catalog.CatalogVersionService catalogVersionService) -
getConfigurationService
protected de.hybris.platform.servicelayer.config.ConfigurationService getConfigurationService() -
setConfigurationService
public void setConfigurationService(de.hybris.platform.servicelayer.config.ConfigurationService configurationService)
-