Skip to content
Snippets Groups Projects
Commit f42dca31 authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

Merge branch '1136-include-yacy-search' into 'development'

Resolve "Include Yacy Search"

Closes #1136

See merge request !1881
parents 46edc88f 34ab25af
No related branches found
No related tags found
3 merge requests!1895Development,!1882Development,!1881Resolve "Include Yacy Search"
......@@ -39,7 +39,7 @@ class Yacy extends Searchengine
$this->engine->{"display-name"}, $this->engine->homepage,
$this->counter
);
}
}
}
} catch (\Exception $e) {
......@@ -48,4 +48,29 @@ class Yacy extends Searchengine
return;
}
}
public function getNext(\App\MetaGer $metager, $result)
{
try{
$resultCount = 0;
$content = json_decode($result, true);
$content = $content["channels"];
foreach ($content as $channel) {
$items = $channel["items"];
$resultCount += sizeof($items);
}
if($resultCount > 0){
$engine = clone $this->engine;
$engine->{"get-parameter"}->startRecord += 10;
$next = new Yacy($this->name, $engine, $metager);
$this->next = $next;
}
} catch (\Exception $e) {
Log::error("A problem occurred parsing results from $this->name:");
Log::error($e->getMessage());
return;
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment