You are here

public function SearchApiMultiQueryInterface::condition in Search API Multi-Index Searches 7

Add a new ($field $operator $value) condition filter.

Parameters

string $field: The field to filter on. Either a field specification as detailed in the class comment, or the special field "search_api_multi_index" which means a filter on the searched indexes.

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

SearchApiMultiQueryInterface The called object.

1 method overrides SearchApiMultiQueryInterface::condition()
SearchApiMultiQuery::condition in ./search_api_multi.query.inc
Add a new ($field $operator $value) condition filter.

File

./search_api_multi.query.inc, line 140

Class

SearchApiMultiQueryInterface
Interface representing a search query on multiple Search API indexes.

Code

public function condition($field, $value, $operator = '=');