) DEFAULT COLLATE utf8mb4_general_ci COMMENT='Push Subscription for the API';
--
--- TABLE test-full-text-search
+-- TABLE check-full-text-search
--
-CREATE TABLE IF NOT EXISTS `test-full-text-search` (
- `pid` int unsigned NOT NULL DEFAULT 0 COMMENT 'Process id of the worker',
+CREATE TABLE IF NOT EXISTS `check-full-text-search` (
+ `pid` int unsigned NOT NULL COMMENT 'The ID of the process',
`searchtext` mediumtext COMMENT 'Simplified text for the full text search',
PRIMARY KEY(`pid`),
FULLTEXT INDEX `searchtext` (`searchtext`)
-) DEFAULT COLLATE utf8mb4_general_ci COMMENT='Test for a full text search match in user defined channels before storing the message in the system';
+) DEFAULT COLLATE utf8mb4_general_ci COMMENT='Check for a full text search match in user defined channels before storing the message in the system';
--
-- TABLE userd
* network:dscs - Posts that are received by the Discourse connector.
* network:tmbl - Posts that are received by the Tumblr connector.
* network:bsky - Posts that are received by the Bluesky connector.
+* platform - Use this to include or exclude some platforms from your channel, e.g. "+platform:friendica".
* visibility - You have the choice between different visibilities. You can only see unlisted or private posts that you have the access for.
* visibility:public
* visibility:unlisted
| [attach](help/database/db_attach) | file attachments |
| [cache](help/database/db_cache) | Stores temporary data |
| [channel](help/database/db_channel) | User defined Channels |
+| [check-full-text-search](help/database/db_check-full-text-search) | Check for a full text search match in user defined channels before storing the message in the system |
| [config](help/database/db_config) | main configuration storage |
| [contact](help/database/db_contact) | contact table |
| [contact-relation](help/database/db_contact-relation) | Contact relations |
| [storage](help/database/db_storage) | Data stored by Database storage backend |
| [subscription](help/database/db_subscription) | Push Subscription for the API |
| [tag](help/database/db_tag) | tags and mentions |
-| [test-full-text-search](help/database/db_test-full-text-search) | Test for a full text search match in user defined channels before storing the message in the system |
| [user](help/database/db_user) | The local users |
| [user-contact](help/database/db_user-contact) | User specific public contact data |
| [user-gserver](help/database/db_user-gserver) | User settings about remote servers |
-Table test-full-text-search
+Table check-full-text-search
===========
-Test for a full text search match in user defined channels before storing the message in the system
+Check for a full text search match in user defined channels before storing the message in the system
Fields
------
}
$store = false;
- $this->db->insert('test-full-text-search', ['pid' => getmypid(), 'searchtext' => $searchtext], Database::INSERT_UPDATE);
+ $this->db->insert('check-full-text-search', ['pid' => getmypid(), 'searchtext' => $searchtext], Database::INSERT_UPDATE);
$channels = $this->db->select(self::$table_name, ['full-text-search', 'uid', 'label'], ["`full-text-search` != ?", '']);
while ($channel = $this->db->fetch($channels)) {
$channelsearchtext = $channel['full-text-search'];
foreach (['from', 'to', 'group', 'tag', 'network', 'platform', 'visibility'] as $keyword) {
$channelsearchtext = preg_replace('~(' . $keyword . ':.[\w@\.-]+)~', '"$1"', $channelsearchtext);
}
- if ($this->db->exists('test-full-text-search', ["`pid` = ? AND MATCH (`searchtext`) AGAINST (? IN BOOLEAN MODE)", getmypid(), $channelsearchtext])) {
+ if ($this->db->exists('check-full-text-search', ["`pid` = ? AND MATCH (`searchtext`) AGAINST (? IN BOOLEAN MODE)", getmypid(), $channelsearchtext])) {
if (in_array($language, $this->pConfig->get($channel['uid'], 'channel', 'languages', [User::getLanguageCode($channel['uid'])]))) {
$store = true;
$this->logger->debug('Matching channel found.', ['uid' => $channel['uid'], 'label' => $channel['label'], 'language' => $language, 'channelsearchtext' => $channelsearchtext, 'searchtext' => $searchtext]);
}
$this->db->close($channels);
- $this->db->delete('test-full-text-search', ['pid' => getmypid()]);
+ $this->db->delete('check-full-text-search', ['pid' => getmypid()]);
return $store;
}
}
DBA::optimizeTable('parsed_url');
DBA::optimizeTable('session');
DBA::optimizeTable('post-engagement');
- DBA::optimizeTable('test-full-text-search');
+ DBA::optimizeTable('check-full-text-search');
if (DI::config()->get('system', 'optimize_all_tables')) {
DBA::optimizeTable('apcontact');
"uid_application-id" => ["uid", "application-id"],
]
],
- "test-full-text-search" => [
- "comment" => "Test for a full text search match in user defined channels before storing the message in the system",
+ "check-full-text-search" => [
+ "comment" => "Check for a full text search match in user defined channels before storing the message in the system",
"fields" => [
- "pid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => "Process id of the worker"],
+ "pid" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "comment" => "The ID of the process"],
"searchtext" => ["type" => "mediumtext", "comment" => "Simplified text for the full text search"],
],
"indexes" => [