BMO provides a search engine to allow full text searching of data provided by modules. This is provided as an Ajax call by the Search input box in the header.
Modules do NOT need to filter their results, but are provided with the query string as the first parameter, in case the module wants to return a different set of results. A basic string match is applied against the returned "text" value using
if (strpos($r['text'], $qs) === false) to strip out the non-matching results. You may add a key of "force" set to true to skip this check and always display the search result to the client.
Format of $results
This is an associative array, with one entry per line to be returned
String to be displayed. Automatic highlighting of matched text that its typed is performed by the browser.
'get' or 'text'. If get, the dest key must be provided. If 'text', the entry is not selectable. You may add other formatting in html here, such as "<h3>Heading</h3>". Text entries will always be displayed, as if 'force' was set.
This may be any reasonable URL format and is rebuilt at the client to go to the correct place. Relative, off-host, and queries are detected and processed properly
If this variable exists and is true, the result will be returned and displayed on the client, even if it's not matched by the search engine.