How to realize the sensitive words searching

Dear tech supporter,
My website needs to be checked by censor whether all articles contain special sensitive words. I have read a lot of posts in this forum. there is a sentence below :

> index[application/pdf] = "/usr/bin/pdftotext -enc UTF-8-nopgbrk % s-| /usr/bin/tr "[:cntrl:]" "

does it can realize the requirements? If could, how did I do to search any sensitive word( such as “abc” ) in the article? If can’t, could you give me some advice?
Thank you very much! Looking forward to your reply.

While I’m not fond of censorship:

Yes, uncommenting this line in the configuration enables indexing of full texts.
You need to rebuild the internal search index using the command line tool {ojs_root}/tools/rebuildSearchIndex.php .

However, results may be limited. There’s no hit highlighting (you just get hits of articles where the search word matched, but no indication where), and depending on language and database setup results may vary.

If you need better search functions, consider installing the Lucene plugin (which provides better language coverage, stemming and hithighlighting). This, however, needs advanced knowledge of OJS and your server (although there come good installation instructions with Lucene).

A third option is to let crawl and index the articles by an external search engine (e.g. Baidu), which then can be used by your “censor”. This, however, requires that all articles are already published.

1 Like

Hi,@mpbraendle
Thanks for your reply! I learned an integrated Algolia plugin, but it seems to be incompatible with OJS3.3, and when parsing the plugin, it will prompt the following error:

AH01071: Got error 'PHP message: PHP Fatal error: Uncaught Error: Call to undefined method AlgoliaPlugin::getTemplateResourceName() in /data/wwwroot/default/ojs/plugins/generic/algolia/AlgoliaPlugin.inc.php:345\nStack trace:\n#0 /data/wwwroot/default/ojs/lib/pkp/classes/plugins/Plugin.inc.php(358): AlgoliaPlugin->getTemplatePath()\n#1 /data/wwwroot/default/ojs/lib/pkp/classes/plugins/Plugin.inc.php(115): Plugin->_registerTemplateResource()\n#2 /data/wwwroot/default/ojs/lib/pkp/classes/plugins/LazyLoadPlugin.inc.php(28): Plugin->register()\n#3 /data/wwwroot/default/ojs/plugins/generic/algolia/AlgoliaPlugin.inc.php(41): LazyLoadPlugin->register()\n#4 /data/wwwroot/default/ojs/lib/pkp/classes/plugins/PluginRegistry.inc.php(69): AlgoliaPlugin->register()\n#5 /data/wwwroot/default/ojs/lib/pkp/classes/plugins/PluginRegistry.inc.php(142): PluginRegistry::register()\n#6 /data/wwwroot/default/ojs/lib/pkp/classes/plugins/PluginRegistry.inc.php(211): PluginRegistry::loadCategory()\n#7 /data/wwwroot/default/ojs/lib/pkp/classes/install/Installer...', referer:
This seems to be due to the deprecation of the getTemplateResourceName() function. Is it possible to modify the code of the algolia integration plugin to make it compatible with OJS3.3? Is there any sample reference I can learn to for revision?
Looking forwards to you, sincerely.