mirror of
https://github.com/friendica/friendica
synced 2025-04-25 07:50:10 +00:00
Option to reduced search scope to improve the performance
This commit is contained in:
parent
d7e038a014
commit
259a676207
11 changed files with 349 additions and 260 deletions
|
@ -28,6 +28,7 @@ use Friendica\DI;
|
|||
use Friendica\Model\Contact;
|
||||
use Friendica\Model\Item;
|
||||
use Friendica\Model\Post;
|
||||
use Friendica\Model\Post\SearchIndex;
|
||||
use Friendica\Model\Tag;
|
||||
use Friendica\Module\BaseApi;
|
||||
use Friendica\Util\Network;
|
||||
|
@ -159,7 +160,7 @@ class Search extends BaseApi
|
|||
} else {
|
||||
$q = Post\Engagement::escapeKeywords($q);
|
||||
$condition = ["MATCH (`searchtext`) AGAINST (? IN BOOLEAN MODE) AND (NOT `restricted` OR `uri-id` IN (SELECT `uri-id` FROM `post-user` WHERE `uid` = ?))", $q, $uid];
|
||||
$table = 'post-searchindex';
|
||||
$table = SearchIndex::getSearchTable();
|
||||
}
|
||||
|
||||
if (!empty($account_id)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue