webCOMAND

search::get()

Perform a keyword search based on the search object and return the corresponding results.

Prototype

collection get( string $keywords )

Parameters

  • keywords - Space separated list of keywords.

Example

$repo = comand::repo();
$search = new \io_comand_search\search($repo, [
    'select' => ['Title', '.Summary()'],
    'from' => ['WebPage+'],
    'where' => ["Status='active'", "Tags.Title='Health'"],
    'limit' => 12
]);
$results = $search->get('example search');
foreach($results as $result) {
    echo("$result\n");
}