return new ExistsQuery($field);
} if (\
is_array($value)) { throw new RuntimeException('Invalid value for TermQuery provided'
);
} $filter =
new BoolQuery();
$filter->
add(new TermQuery($field,
$value), BoolQuery::MUST_NOT
);
return $filter;
case ProductAttributeCondition::OPERATOR_LT:
return new RangeQuery($field,
['lt' =>
$value]);
case ProductAttributeCondition::OPERATOR_LTE:
return new RangeQuery($field,
['lte' =>
$value]);
case ProductAttributeCondition::OPERATOR_BETWEEN:
if (!\
is_array($value)) { throw new RuntimeException('Invalid value for RangeQuery provided'
);
} return new RangeQuery($field,
['gte' =>
$value['min'
], 'lte' =>
$value['max'
]]);