mirror of
https://github.com/YGGverse/Yo.git
synced 2026-03-31 09:45:30 +00:00
remove webui features from cli
This commit is contained in:
parent
f0b1c2cf40
commit
e01ad2ebdb
1 changed files with 3 additions and 26 deletions
|
|
@ -23,33 +23,10 @@ $index = $client->index(
|
|||
$config->manticore->index->document->name
|
||||
);
|
||||
|
||||
// Init search query
|
||||
$query = $index->search(
|
||||
$argv[1]
|
||||
);
|
||||
|
||||
// Apply search options (e.g. field_weights)
|
||||
foreach ($config->webui->search->options as $key => $value)
|
||||
{
|
||||
if (is_int($value) || is_string($value))
|
||||
{
|
||||
$query->option(
|
||||
$key,
|
||||
$value
|
||||
);
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
$query->option(
|
||||
$key,
|
||||
(array) $value
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Search
|
||||
foreach($query->limit($argv[2] ? $argv[2] : 10)->get() as $result)
|
||||
foreach($index->search($argv[1])
|
||||
->limit($argv[2] ? $argv[2] : 10)
|
||||
->get() as $result)
|
||||
{
|
||||
var_dump(
|
||||
$result
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue