public function SearchApiQueryInterface::condition in Search API 7
Adds a new ($field $operator $value) condition filter.
Parameters
string $field: The field to filter on, e.g. 'title'.
mixed $value: The value the field should have (or be related to by the operator).
string $operator: The operator to use for checking the constraint. The following operators are supported for primitive types: "=", "<>", "<", "<=", ">=", ">". They have the same semantics as the corresponding SQL operators. If $field is a fulltext field, $operator can only be "=" or "<>", which are in this case interpreted as "contains" or "doesn't contain", respectively. If $value is NULL, $operator also can only be "=" or "<>", meaning the field must have no or some value, respectively.
Return value
SearchApiQueryInterface The called object.
1 method overrides SearchApiQueryInterface::condition()
- SearchApiQuery::condition in includes/
query.inc - Adds a new ($field $operator $value) condition filter.
File
- includes/
query.inc, line 146 - Contains SearchApiQueryInterface and SearchApiQuery.
Class
- SearchApiQueryInterface
- Interface representing a search query on an Search API index.
Code
public function condition($field, $value, $operator = '=');