Search
oikapi provides multiple search modes, automatically detecting the query type.
Global search
Section titled “Global search”GET /api/search?q=acmeThe search engine automatically detects the query type:
| Pattern | Search type | Performance |
|---|---|---|
ABC-123 | Counter search | Instant |
| UUID format | UUID search | Instant |
| Text | Full-text search | Ranked results |
Full-text search
Section titled “Full-text search”Text queries return relevance-ranked results across all searchable fields:
GET /api/search?q=website+redesign&preview=trueWith preview=true, results include matched record data (name, title, description, and other display fields) suitable for rendering in a search dropdown or preview panel. Text queries require preview=true; omitting it returns a 400 error.
Counter search
Section titled “Counter search”Search by counter prefix and number. Partial matches work – searching INV-42 finds INV-00042:
GET /api/search?q=INV-42Reference search (autocomplete)
Section titled “Reference search (autocomplete)”For populating reference field dropdowns and autocomplete inputs:
GET /api/apps/crm/tables/companies/records?find_refs=acmeReturns matching records with their display values, designed for fast autocomplete in UIs.
Permission filtering
Section titled “Permission filtering”Search results are filtered by the user’s permissions. Users only see records from tables they have read access to, and any row-level security (RLS) filters on those tables are applied to search results as well — so a user never sees a record through search that they could not see by querying the table directly.
Searchable configuration
Section titled “Searchable configuration”Tables and individual fields can be marked as searchable or non-searchable to control what appears in global search results.