mirror of
https://github.com/friendica/friendica
synced 2025-04-24 11:50:10 +00:00
Include more field in the fulltext search
This commit is contained in:
parent
dfeae25e6d
commit
86592daaa1
3 changed files with 11 additions and 3 deletions
|
@ -152,16 +152,17 @@ class Index extends BaseSearch
|
|||
if ($tag) {
|
||||
Logger::info('Start tag search.', ['q' => $search]);
|
||||
$uriids = Tag::getURIIdListByTag($search, local_user(), $pager->getStart(), $pager->getItemsPerPage());
|
||||
$count = Tag::countByTag($search, local_user());
|
||||
} else {
|
||||
Logger::info('Start fulltext search.', ['q' => $search]);
|
||||
$uriids = ItemContent::getURIIdListBySearch($search, local_user(), $pager->getStart(), $pager->getItemsPerPage());
|
||||
$count = ItemContent::countBySearch($search, local_user());
|
||||
}
|
||||
|
||||
if (!empty($uriids)) {
|
||||
$params = ['order' => ['id' => true], 'group_by' => ['uri-id']];
|
||||
$items = Item::selectForUser(local_user(), [], ['uri-id' => $uriids], $params);
|
||||
$r = Item::inArray($items);
|
||||
$count = Tag::countByTag($search, local_user());
|
||||
} else {
|
||||
$count = 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue