Class DefaultSearchQueryConditionsConverter

java.lang.Object
com.hybris.backoffice.solrsearch.converters.impl.DefaultSearchQueryConditionsConverter
All Implemented Interfaces:
SearchQueryConditionsConverter

public class DefaultSearchQueryConditionsConverter extends Object implements SearchQueryConditionsConverter
  • Constructor Details

    • DefaultSearchQueryConditionsConverter

      public DefaultSearchQueryConditionsConverter()
  • Method Details

    • convert

      public List<SolrSearchCondition> convert(List<? extends com.hybris.cockpitng.search.data.SearchQueryCondition> conditions, SearchQuery.Operator globalOperator, IndexedType indexedType)
      Description copied from interface: SearchQueryConditionsConverter
      Converts a list of SearchQueryCondition to a list of SolrSearchCondition. Converted condition list contains only one element for a specific attribute combined with a language (if attribute is localized) on the same level of a query SolrSearchCondition(List, SearchQuery.Operator) as opposed to SearchQueryCondition list which can have multiple conditions for the same attribute.
      Specified by:
      convert in interface SearchQueryConditionsConverter
      Parameters:
      conditions - conditions from simple search.
      globalOperator - operator used to join conditions.
      indexedType - solr configuration for indexed type.
      Returns:
      list of converted SolrSearchCondition.
    • convertConditions

      protected void convertConditions(List<SolrSearchCondition> convertedConditions, List<? extends com.hybris.cockpitng.search.data.SearchQueryCondition> conditions, SearchQuery.Operator globalOperator, IndexedType indexedType)
    • groupConditionsByAttribute

      protected Map<String,List<com.hybris.cockpitng.search.data.SearchQueryCondition>> groupConditionsByAttribute(List<? extends com.hybris.cockpitng.search.data.SearchQueryCondition> conditions, Map<String,IndexedProperty> properties)
    • extractNestedConditions

      protected List<com.hybris.cockpitng.search.data.SearchQueryConditionList> extractNestedConditions(List<? extends com.hybris.cockpitng.search.data.SearchQueryCondition> conditions)
    • appendAttributeCondition

      protected void appendAttributeCondition(List<SolrSearchCondition> convertedConditions, List<com.hybris.cockpitng.search.data.SearchQueryCondition> conditions, IndexedProperty property, SearchQuery.Operator operator)
    • splitConditionsByLanguage

      protected Map<Locale,List<com.hybris.cockpitng.search.data.SearchQueryCondition>> splitConditionsByLanguage(List<com.hybris.cockpitng.search.data.SearchQueryCondition> conditions)
    • createConditionForProperty

      protected SolrSearchCondition createConditionForProperty(IndexedProperty indexedProperty, List<com.hybris.cockpitng.search.data.SearchQueryCondition> conditions, SearchQuery.Operator operator, Locale locale)
    • extractLocalizedValue

      protected Object extractLocalizedValue(Object value)
    • extractValueLocale

      protected Locale extractValueLocale(Object value)