mirror of
https://github.com/YGGverse/Yo.git
synced 2026-03-31 17:55:35 +00:00
fix debug output
This commit is contained in:
parent
7dfc800a67
commit
13cf61b42c
1 changed files with 27 additions and 20 deletions
|
|
@ -163,7 +163,7 @@ foreach($search->get() as $document)
|
|||
|
||||
// Replace document
|
||||
// https://github.com/manticoresoftware/manticoresearch-php/issues/10#issuecomment-612685916
|
||||
$index->replaceDocument(
|
||||
$data =
|
||||
[
|
||||
'url' => $document->get('url'),
|
||||
'title' => $title,
|
||||
|
|
@ -172,11 +172,27 @@ foreach($search->get() as $document)
|
|||
'code' => $code,
|
||||
'size' => $size,
|
||||
'mime' => $mime,
|
||||
'time' => time(),
|
||||
],
|
||||
'time' => time()
|
||||
];
|
||||
|
||||
$result = $index->replaceDocument(
|
||||
$data,
|
||||
$document->getId()
|
||||
);
|
||||
|
||||
echo sprintf(
|
||||
'index "%s" updated: %s %s' . PHP_EOL,
|
||||
$config->manticore->index->document,
|
||||
print_r(
|
||||
$result,
|
||||
true
|
||||
),
|
||||
print_r(
|
||||
$data,
|
||||
true
|
||||
),
|
||||
);
|
||||
|
||||
// Crawl documents
|
||||
$documents = [];
|
||||
|
||||
|
|
@ -257,13 +273,4 @@ foreach($search->get() as $document)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
echo sprintf(
|
||||
'index "%s" updated: %s' . PHP_EOL,
|
||||
$config->manticore->index->document,
|
||||
print_r(
|
||||
$document,
|
||||
true
|
||||
)
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue