Introduction
In the Magento 2 when we build a Search Criteria
we use filters
. And each filter
takes parameter condition type
.
This parameter is necessary to say Magento how we want to filter a field: should a field be greater
or less
than passed value
to the filter
, for example.
In my previous article I explained in simple terms how we can use Search Criteria.
In this article I prepared the table of all available condition types
in the Magento 2 with filters
and conditions
and without it.
The table of All Available Condition Types in the Magento 2
Condition | Explanation |
---|---|
eq |
Equals |
neq |
Not equal |
gteq |
Greater than or equal |
lteq |
Less than or equal |
moreq |
More or equal |
gt |
Greater than |
lt |
Less than |
from |
The beginning of a range. Must be used with to . |
to |
The end of a range. Must be used with from . |
in |
In. The value can contain a comma-separated list of values. |
nin |
Not in. The value can contain a comma-separated list of values. |
finset |
A value within a set of values |
nfinset |
A value that is not within a set of values. |
like |
Like. The value can contain the SQL wildcard characters when like is specified. |
nlike |
Not like |
null |
Null |
notnull |
Not null |
🤘