@Service(value="blSolrHelperService") public class SolrHelperServiceImpl extends Object implements SolrHelperService
| Modifier and Type | Field and Description |
|---|---|
protected static String |
DEFAULT_NAMESPACE |
protected static Locale |
defaultLocale |
protected SolrSearchServiceExtensionManager |
extensionManager |
protected static String |
GLOBAL_FACET_TAG_FIELD |
protected LocaleService |
localeService |
protected static String |
PREFIX_SEPARATOR |
| Constructor and Description |
|---|
SolrHelperServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
protected String |
convertPrefixListToString(List<String> prefixList) |
protected void |
copyPropertyToCollection(Collection<Object> collection,
Object o) |
String |
getCategoryFieldName() |
Long |
getCategoryId(Long tentativeCategoryId)
In certain cases, the category id used for Solr indexing is different than the direct id on the product.
|
String |
getCategorySortFieldName(Category category) |
String |
getCategorySortFieldName(Long categoryId) |
String |
getCurrentNamespace()
Determines the current namespace we are operating on.
|
Locale |
getDefaultLocale()
Returns the default locale.
|
String |
getDefaultLocalePrefix() |
String |
getExplicitCategoryFieldName() |
String |
getGlobalFacetTagField()
This property is needed to be non-null to allow filtering by multiple facets at one time and have the results
be an AND of the facets.
|
String |
getIdFieldName() |
String |
getLocalePrefix()
Determines if there is a locale prefix that needs to be applied to the given field for this particular request.
|
String |
getNamespaceFieldName() |
Long |
getProductId(Long tentativeProductId)
In certain cases, the product id used for Solr indexing is different than the direct id on the product.
|
String |
getProductIdFieldName() |
String |
getPropertyNameForFieldFacet(Field field)
Returns the property name for the given field and its configured facet field type.
|
String |
getPropertyNameForFieldFacet(Field field,
String prefix)
Returns the property name for the given field, its configured facet field type, and the given prefix
|
String |
getPropertyNameForFieldSearchable(Field field,
FieldType searchableFieldType)
Returns the property name for the given field and field type.
|
String |
getPropertyNameForFieldSearchable(Field field,
FieldType searchableFieldType,
String prefix)
Returns the property name for the given field, field type, and prefix
|
Object |
getPropertyValue(Object object,
Field field)
See getPropertyValue(Object, String)
|
Object |
getPropertyValue(Object object,
String propertyName)
This method is meant to behave in a similar way to Apache's PropertyUtils.getProperty(Object, String).
|
protected Object |
getPropertyValueInternal(Object object,
String[] components,
int currentPosition) |
List<FieldType> |
getSearchableFieldTypes(Field field)
Returns the searchable field types for the given field.
|
Long |
getSkuId(Long tentativeSkuId)
In certain cases, the sku id used for Solr indexing is different than the direct id on the sku.
|
String |
getSkuIdFieldName() |
String |
getSolrDocumentId(org.apache.solr.common.SolrInputDocument document,
Product product) |
String |
getSolrDocumentId(org.apache.solr.common.SolrInputDocument document,
Sku sku) |
void |
swapActiveCores()
This should only ever be called when using the Solr reindex service to do a full reindex.
|
protected static final String GLOBAL_FACET_TAG_FIELD
protected static final String DEFAULT_NAMESPACE
protected static final String PREFIX_SEPARATOR
protected static Locale defaultLocale
protected LocaleService localeService
protected SolrSearchServiceExtensionManager extensionManager
public void swapActiveCores()
throws ServiceException
swapActiveCores in interface SolrHelperServiceServiceExceptionpublic String getCurrentNamespace()
SolrHelperServicegetCurrentNamespace in interface SolrHelperServicepublic String getGlobalFacetTagField()
SolrHelperServicegetGlobalFacetTagField in interface SolrHelperServicepublic String getPropertyNameForFieldSearchable(Field field, FieldType searchableFieldType, String prefix)
SolrHelperServicegetPropertyNameForFieldSearchable in interface SolrHelperServicepublic String getPropertyNameForFieldFacet(Field field, String prefix)
SolrHelperServicegetPropertyNameForFieldFacet in interface SolrHelperServicepublic List<FieldType> getSearchableFieldTypes(Field field)
SolrHelperServicegetSearchableFieldTypes in interface SolrHelperServicepublic String getPropertyNameForFieldSearchable(Field field, FieldType searchableFieldType)
SolrHelperServicegetPropertyNameForFieldSearchable in interface SolrHelperServicepublic String getPropertyNameForFieldFacet(Field field)
SolrHelperServicegetPropertyNameForFieldFacet in interface SolrHelperServicepublic Long getCategoryId(Long tentativeCategoryId)
SolrHelperServicegetCategoryId in interface SolrHelperServicepublic Long getProductId(Long tentativeProductId)
SolrHelperServicegetProductId in interface SolrHelperServicepublic Long getSkuId(Long tentativeSkuId)
SolrHelperServicegetSkuId in interface SolrHelperServicepublic String getSolrDocumentId(org.apache.solr.common.SolrInputDocument document, Product product)
getSolrDocumentId in interface SolrHelperServicepublic String getSolrDocumentId(org.apache.solr.common.SolrInputDocument document, Sku sku)
getSolrDocumentId in interface SolrHelperServicepublic String getNamespaceFieldName()
getNamespaceFieldName in interface SolrHelperServicepublic String getIdFieldName()
getIdFieldName in interface SolrHelperServicepublic String getProductIdFieldName()
getProductIdFieldName in interface SolrHelperServicepublic String getSkuIdFieldName()
getSkuIdFieldName in interface SolrHelperServicepublic String getCategoryFieldName()
getCategoryFieldName in interface SolrHelperServicepublic String getExplicitCategoryFieldName()
getExplicitCategoryFieldName in interface SolrHelperServicepublic String getCategorySortFieldName(Category category)
getCategorySortFieldName in interface SolrHelperServicepublic String getCategorySortFieldName(Long categoryId)
getCategorySortFieldName in interface SolrHelperServicepublic String getLocalePrefix()
SolrHelperServicegetLocalePrefix in interface SolrHelperServicepublic String getDefaultLocalePrefix()
getDefaultLocalePrefix in interface SolrHelperServicepublic Locale getDefaultLocale()
SolrHelperServicegetDefaultLocale in interface SolrHelperServicepublic Object getPropertyValue(Object object, Field field) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException
SolrHelperServicegetPropertyValue in interface SolrHelperServiceNoSuchMethodExceptionInvocationTargetExceptionIllegalAccessExceptionpublic Object getPropertyValue(Object object, String propertyName) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException
SolrHelperServicegetPropertyValue in interface SolrHelperServiceNoSuchMethodExceptionInvocationTargetExceptionIllegalAccessExceptionprotected Object getPropertyValueInternal(Object object, String[] components, int currentPosition) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException
protected void copyPropertyToCollection(Collection<Object> collection, Object o)
Copyright © 2015. All Rights Reserved.