Class SolrSearchCondition
java.lang.Object
com.hybris.backoffice.solrsearch.dataaccess.SolrSearchCondition
- All Implemented Interfaces:
Serializable
Representation of solr search condition.
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionSolrSearchCondition(String attributeName, String attributeType, boolean multiValue, Locale locale, SearchQuery.Operator operator, boolean filterQueryCondition) Creates condition for specified attribute and locale.SolrSearchCondition(String attributeName, String attributeType, SearchQuery.Operator operator) Creates condition for specified attribute and locale.SolrSearchCondition(String attributeName, String attributeType, Locale language, SearchQuery.Operator operator) Creates condition for specified attribute and locale.SolrSearchCondition(List<SolrSearchCondition> nestedConditions, SearchQuery.Operator operator) Creates condition which aggregates nested conditions.SolrSearchCondition(List<SolrSearchCondition> nestedConditions, SearchQuery.Operator operator, boolean filterQueryCondition) Creates condition which aggregates nested conditions. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddConditionValue(Object value, com.hybris.cockpitng.search.data.ValueComparisonOperator comparisonOperator) Adds a value to the condition.booleanInforms if it is a filter query (fq) condition.booleanTells if indexed property for this type is multi valueIndexedProperty.isMultiValue()booleanInforms if it is aggregating condition which consists of nested conditions.
-
Constructor Details
-
SolrSearchCondition
public SolrSearchCondition(String attributeName, String attributeType, Locale language, SearchQuery.Operator operator) Creates condition for specified attribute and locale. All values of the condition are combined with given operator.- Parameters:
attributeName- attribute name of field which is specified in this condition.attributeType- attribute type of field which is specified in this condition.language- locale of the condition. If condition locale equals current user's locale.operator- operator used to combinegetConditionValues().
-
SolrSearchCondition
public SolrSearchCondition(String attributeName, String attributeType, SearchQuery.Operator operator) Creates condition for specified attribute and locale. All values of the condition are combined with given operator.- Parameters:
attributeName- attribute name of field which is specified in this condition.attributeType- attribute type of field which is specified in this condition.operator- operator used to combinegetConditionValues().
-
SolrSearchCondition
public SolrSearchCondition(String attributeName, String attributeType, boolean multiValue, Locale locale, SearchQuery.Operator operator, boolean filterQueryCondition) Creates condition for specified attribute and locale. All values of the condition are combined with given operator. Allows to specify if indexed property is multi value. Allows to notify Solr that it should use this condition as filter query.- Parameters:
attributeName- attribute name of field which is specified in this condition.attributeType- attribute type of field which is specified in this condition.multiValue- tells if indexed property is multi value fieldIndexedProperty.isMultiValue().locale- locale of the condition chosen in the condition it can be different than current user's locale.operator- operator used to combinegetConditionValues().filterQueryCondition- tells if condition should be used as fq (filter query). Setting to false doesn't necessarily mean it won't be used as fq, because every condition can be used as fq if its type and operator is a good match for it.
-
SolrSearchCondition
public SolrSearchCondition(List<SolrSearchCondition> nestedConditions, SearchQuery.Operator operator) Creates condition which aggregates nested conditions. It's not bound to any specific attribute just has conditions and operator which combines them them.- Parameters:
nestedConditions- list of nested conditions.operator- operator used to combine nested conditions.
-
SolrSearchCondition
public SolrSearchCondition(List<SolrSearchCondition> nestedConditions, SearchQuery.Operator operator, boolean filterQueryCondition) Creates condition which aggregates nested conditions. It's not bound to any specific attribute just has conditions and operator which combines them them.- Parameters:
nestedConditions- list of nested conditions.operator- operator used to combine nested conditions.filterQueryCondition- tells if condition should be used as fq (filter query)
-
-
Method Details
-
getNestedConditions
-
getAttributeName
-
getAttributeType
-
getLanguage
-
getOperator
-
isMultiValue
public boolean isMultiValue()Tells if indexed property for this type is multi valueIndexedProperty.isMultiValue()- Returns:
- true if is multi value.
-
getConditionValues
-
addConditionValue
public void addConditionValue(Object value, com.hybris.cockpitng.search.data.ValueComparisonOperator comparisonOperator) Adds a value to the condition.- Parameters:
value- value which will be used in condition.comparisonOperator- operator used in a queryValueComparisonOperator
-
isNestedCondition
public boolean isNestedCondition()Informs if it is aggregating condition which consists of nested conditions.- Returns:
- true if it is aggregating condition.
-
isFilterQueryCondition
public boolean isFilterQueryCondition()Informs if it is a filter query (fq) condition.
-