_search
Searches for the specified text, and produces the matches --
Function
_search
(query, models, properties, searchTags, searchThings) -> _searchResultType
- query
- The text to search for, minimum 3 characters
- models (optional)
- If provided, the search will be restricted to Instances and Tags of these Models
- properties (optional)
- If provided, only these Properties will be searched. Remember to use _self on each of these!
- searchTags (optional)
- (default true) Tag names will be searched only if this is true
- searchThings (optional)
- (default true) Things (non-Tags) will be searched only if this is true
- Produces
- A List of search results.
Querki has built-in Search capabilities -- users can Search from the box in the menu bar, and the
results are shown on the standard Search Results page. But sometimes you want more control over your searches:
you want to show the results directly on a page, formatted the way you like. Or you want to control precisely what
gets searched. The _search()
function gives you that power.
Note: _search will never return the Thing that it is defined on. That's necessary in order to prevent
infinitely-recursive results.