$search
The $search query option performs a free-text search across all string properties.
Syntax
GET /odata/Products?$search=widget
GET /odata/Products?$search="multi word search"How it works
The resolver:
- Inspects the entity type's declared properties
- Identifies all properties typed as
Edm.String - Generates a
WHEREclause withLIKE '%term%'for each string column - Combines them with
OR
For example, if the entity type has name (String), description (String), and price (Decimal), searching for widget produces:
sql
WHERE (name LIKE '%widget%' OR description LIKE '%widget%')Interaction with $filter
$search and $filter are combined with AND. A row must match both the filter and the search term.
GET /odata/Products?$filter=price gt 10&$search=widgetsql
WHERE price > 10 AND (name LIKE '%widget%' OR description LIKE '%widget%')Limitations
- Case sensitivity depends on the database collation
- No boolean operators (AND, OR, NOT) within the search term
- No phrase matching or proximity search
- Searches only
Edm.Stringproperties (not navigation properties)