| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
INDEXED_FIELDS_KEY |
protected static java.lang.String |
VALUE_PROVIDERS_KEY |
| Constructor and Description |
|---|
DefaultIndexer() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addCommonFields(SolrInputDocument document,
IndexerBatchContext batchContext,
ItemModel model) |
protected void |
addIndexedPropertyFields(InputDocument document,
IndexerBatchContext batchContext,
ItemModel model) |
protected void |
addIndexedPropertyFieldsForNewApi(InputDocument document,
IndexerBatchContext batchContext,
ItemModel model,
java.util.Collection<IndexedProperty> indexedProperties,
java.lang.String valueProviderId,
ValueResolver<ItemModel> valueProvider) |
protected void |
addIndexedPropertyFieldsForOldApi(InputDocument document,
IndexerBatchContext batchContext,
ItemModel model,
java.util.Collection<IndexedProperty> indexedProperties,
java.lang.String valueProviderId,
FieldValueProvider valueProvider) |
protected void |
addIndexedTypeFields(InputDocument document,
IndexerBatchContext batchContext,
ItemModel model) |
protected void |
addIndexedTypeFieldsForNewApi(InputDocument document,
IndexerBatchContext batchContext,
ItemModel model,
java.lang.String typeValueProviderBeanId,
TypeValueResolver<ItemModel> typeValueProvider) |
protected void |
addIndexedTypeFieldsForOldApi(InputDocument document,
IndexerBatchContext batchContext,
ItemModel model,
java.lang.String typeValueProviderBeanId,
IndexedTypeFieldsValuesProvider typeValueProvider) |
protected SolrInputDocument |
createInputDocument(ItemModel model,
IndexConfig indexConfig,
IndexedType indexedType) |
protected SolrInputDocument |
createInputDocument(ItemModel model,
IndexConfig indexConfig,
IndexedType indexedType,
java.util.Collection<IndexedProperty> indexedProperties) |
protected DefaultSolrInputDocument |
createWrappedDocument(IndexerBatchContext batchContext,
SolrInputDocument delegate) |
protected DefaultSolrInputDocument |
createWrappedDocumentForPartialUpdates(IndexerBatchContext batchContext,
SolrInputDocument delegate,
java.util.Set<java.lang.String> indexedPropertiesFields) |
protected BeanFactory |
getBeanFactory() |
protected Exporter |
getExporter(SolrServerMode serverMode) |
FieldNameProvider |
getFieldNameProvider() |
protected IdentityProvider<ItemModel> |
getIdentityProvider(IndexedType indexedType) |
protected java.util.Set<java.lang.String> |
getIndexedFields(IndexerBatchContext batchContext) |
protected java.util.Set<java.lang.String> |
getIndexedFields(Index index,
SolrClient solrClient) |
IndexerBatchContextFactory |
getIndexerBatchContextFactory() |
ModelService |
getModelService() |
RangeNameProvider |
getRangeNameProvider() |
SolrSearchProviderFactory |
getSolrSearchProviderFactory() |
TypeService |
getTypeService() |
protected java.lang.Object |
getTypeValueProvider(java.lang.String beanName) |
ValueProviderSelectionStrategy |
getValueProviderSelectionStrategy() |
protected void |
handleError(IndexConfig indexConfig,
IndexedType indexedType,
java.lang.String message,
java.lang.Exception error) |
protected void |
handleError(IndexConfig indexConfig,
java.lang.String message,
java.lang.Exception error) |
java.util.Collection<SolrInputDocument> |
indexItems(java.util.Collection<ItemModel> items,
FacetSearchConfig facetSearchConfig,
IndexedType indexedType)
Method send items to indexer.
|
java.util.Collection<SolrInputDocument> |
indexItems(java.util.Collection<ItemModel> items,
FacetSearchConfig facetSearchConfig,
IndexedType indexedType,
java.util.Collection<IndexedProperty> indexedProperties)
Method send items to indexer.
|
java.util.Collection<java.lang.String> |
removeItems(java.util.Collection<ItemModel> items,
FacetSearchConfig facetSearchConfig,
IndexedType indexedType)
Remove from index all items by indexer identifiers.
|
void |
removeItemsByPk(java.util.Collection<PK> pks,
FacetSearchConfig facetSearchConfig,
IndexedType indexedType,
Index index) |
protected java.util.Map<java.lang.String,java.util.Collection<IndexedProperty>> |
resolveValueProviders(IndexerBatchContext batchContext) |
void |
setBeanFactory(BeanFactory beanFactory) |
void |
setFieldNameProvider(FieldNameProvider fieldNameProvider) |
void |
setIndexerBatchContextFactory(IndexerBatchContextFactory indexerBatchContextFactory) |
void |
setModelService(ModelService modelService) |
void |
setRangeNameProvider(RangeNameProvider rangeNameProvider) |
void |
setSolrSearchProviderFactory(SolrSearchProviderFactory solrSearchProviderFactory) |
void |
setTypeService(TypeService typeService) |
void |
setValueProviderSelectionStrategy(ValueProviderSelectionStrategy valueProviderSelectionStrategy) |
protected void |
validateCommonRequiredParameters(ItemModel item,
IndexConfig indexConfig,
IndexedType indexedType) |
protected static final java.lang.String VALUE_PROVIDERS_KEY
protected static final java.lang.String INDEXED_FIELDS_KEY
public ModelService getModelService()
public void setModelService(ModelService modelService)
public TypeService getTypeService()
public void setTypeService(TypeService typeService)
public SolrSearchProviderFactory getSolrSearchProviderFactory()
public void setSolrSearchProviderFactory(SolrSearchProviderFactory solrSearchProviderFactory)
public IndexerBatchContextFactory getIndexerBatchContextFactory()
public void setIndexerBatchContextFactory(IndexerBatchContextFactory indexerBatchContextFactory)
public FieldNameProvider getFieldNameProvider()
public void setFieldNameProvider(FieldNameProvider fieldNameProvider)
public RangeNameProvider getRangeNameProvider()
public void setRangeNameProvider(RangeNameProvider rangeNameProvider)
public ValueProviderSelectionStrategy getValueProviderSelectionStrategy()
public void setValueProviderSelectionStrategy(ValueProviderSelectionStrategy valueProviderSelectionStrategy)
protected BeanFactory getBeanFactory()
public void setBeanFactory(BeanFactory beanFactory)
public java.util.Collection<SolrInputDocument> indexItems(java.util.Collection<ItemModel> items, FacetSearchConfig facetSearchConfig, IndexedType indexedType) throws IndexerException, java.lang.InterruptedException
IndexerindexItems in interface Indexeritems - items for send to indexer in one transactionfacetSearchConfig - configuration of facet searchindexedType - indexed type definitionIndexerException - if an error occurs during indexingjava.lang.InterruptedException - if any thread interrupted the current thread before before it completed indexing. The interrupted
status of the current thread is cleared when this exception is thrown.public java.util.Collection<SolrInputDocument> indexItems(java.util.Collection<ItemModel> items, FacetSearchConfig facetSearchConfig, IndexedType indexedType, java.util.Collection<IndexedProperty> indexedProperties) throws IndexerException, java.lang.InterruptedException
IndexerindexItems in interface Indexeritems - items for send to indexer in one transactionfacetSearchConfig - configuration of facet searchindexedType - indexed type definitionindexedProperties - the properties to indexIndexerException - if an error occurs during indexingjava.lang.InterruptedException - if any thread interrupted the current thread before before it completed indexing. The interrupted
status of the current thread is cleared when this exception is thrown.public void removeItemsByPk(java.util.Collection<PK> pks, FacetSearchConfig facetSearchConfig, IndexedType indexedType, Index index) throws IndexerException, java.lang.InterruptedException
removeItemsByPk in interface Indexerpks - - list of pks to be removedfacetSearchConfig - - the facet search configurationindexedType - - the indexed typejava.lang.InterruptedException - if any thread interrupted the current thread before before it completed indexing. The interrupted status
of the current thread is cleared when this exception is thrown.IndexerExceptionpublic java.util.Collection<java.lang.String> removeItems(java.util.Collection<ItemModel> items, FacetSearchConfig facetSearchConfig, IndexedType indexedType) throws IndexerException, java.lang.InterruptedException
IndexerremoveItems in interface Indexeritems - items for send to indexer in one transactionfacetSearchConfig - configuration of facet searchindexedType - indexed type definitionIndexerException - if an error occurs during indexingjava.lang.InterruptedException - if any thread interrupted the current thread before before it completed indexing. The interrupted
status of the current thread is cleared when this exception is thrown.protected void handleError(IndexConfig indexConfig, IndexedType indexedType, java.lang.String message, java.lang.Exception error) throws IndexerException
IndexerExceptionprotected IdentityProvider<ItemModel> getIdentityProvider(IndexedType indexedType)
protected Exporter getExporter(SolrServerMode serverMode)
protected SolrInputDocument createInputDocument(ItemModel model, IndexConfig indexConfig, IndexedType indexedType) throws FieldValueProviderException
FieldValueProviderExceptionprotected SolrInputDocument createInputDocument(ItemModel model, IndexConfig indexConfig, IndexedType indexedType, java.util.Collection<IndexedProperty> indexedProperties) throws FieldValueProviderException
FieldValueProviderExceptionprotected void validateCommonRequiredParameters(ItemModel item, IndexConfig indexConfig, IndexedType indexedType)
protected DefaultSolrInputDocument createWrappedDocument(IndexerBatchContext batchContext, SolrInputDocument delegate)
protected DefaultSolrInputDocument createWrappedDocumentForPartialUpdates(IndexerBatchContext batchContext, SolrInputDocument delegate, java.util.Set<java.lang.String> indexedPropertiesFields)
protected void addCommonFields(SolrInputDocument document,
IndexerBatchContext batchContext,
ItemModel model)
protected void addIndexedPropertyFields(InputDocument document, IndexerBatchContext batchContext, ItemModel model) throws FieldValueProviderException
FieldValueProviderExceptionprotected void addIndexedPropertyFieldsForOldApi(InputDocument document, IndexerBatchContext batchContext, ItemModel model, java.util.Collection<IndexedProperty> indexedProperties, java.lang.String valueProviderId, FieldValueProvider valueProvider) throws FieldValueProviderException
FieldValueProviderExceptionprotected void addIndexedPropertyFieldsForNewApi(InputDocument document, IndexerBatchContext batchContext, ItemModel model, java.util.Collection<IndexedProperty> indexedProperties, java.lang.String valueProviderId, ValueResolver<ItemModel> valueProvider) throws FieldValueProviderException
FieldValueProviderExceptionprotected void addIndexedTypeFields(InputDocument document, IndexerBatchContext batchContext, ItemModel model) throws FieldValueProviderException
FieldValueProviderExceptionprotected void addIndexedTypeFieldsForOldApi(InputDocument document, IndexerBatchContext batchContext, ItemModel model, java.lang.String typeValueProviderBeanId, IndexedTypeFieldsValuesProvider typeValueProvider) throws FieldValueProviderException
FieldValueProviderExceptionprotected void addIndexedTypeFieldsForNewApi(InputDocument document, IndexerBatchContext batchContext, ItemModel model, java.lang.String typeValueProviderBeanId, TypeValueResolver<ItemModel> typeValueProvider) throws FieldValueProviderException
FieldValueProviderExceptionprotected java.util.Map<java.lang.String,java.util.Collection<IndexedProperty>> resolveValueProviders(IndexerBatchContext batchContext)
protected java.util.Set<java.lang.String> getIndexedFields(IndexerBatchContext batchContext) throws FieldValueProviderException
FieldValueProviderExceptionprotected java.util.Set<java.lang.String> getIndexedFields(Index index, SolrClient solrClient) throws SolrServerException, java.io.IOException
SolrServerExceptionjava.io.IOExceptionprotected void handleError(IndexConfig indexConfig, java.lang.String message, java.lang.Exception error) throws FieldValueProviderException
FieldValueProviderExceptionprotected java.lang.Object getTypeValueProvider(java.lang.String beanName)
Copyright © 2018 SAP SE. All Rights Reserved.