No Code Attached Yet bug
avatar pixelhexe
pixelhexe
28 Nov 2024

Is your feature request related to a problem? Please describe.

It's an old problem with smart search and finder content plugin: users searching for a string will see all articles that an author has created (if the search string is an author's name), no matter whether his name is found elsewhere in the article or not.

As described already in 2015:
I would like to have the search to exclude the author from the index, so that search results returned only show articles in which the author is mentioned in content but not articles created by author.

The only possibility I found is a core hack in
\plugins\finder\content\src\Extension\Content.php

  1. comment the following lines:
    // $item->addInstruction(FinderIndexer::META_CONTEXT, 'metaauthor');
    // $item->addInstruction(FinderIndexer::META_CONTEXT, 'author');
    // $item->addInstruction(FinderIndexer::META_CONTEXT, 'created_by_alias');

  2. empty the search index

  3. reindex

Describe the solution you'd like

Add an option in the finder content plugin to limit search results only to article content and exclude search by author who has created an article.

Please note that the option of "Taxonomies to index" -> "Author" is not the same! I don't want to generally exclude artices from an author. I just do not want to find these articles in my search results on searching by author's names.

It's a little difficult to explain. In other words: for example if an author's name is mentioned in an item as in an imprint page, this article of course should be found in my search results. But not all articles which are written by this author.

avatar pixelhexe pixelhexe - open - 28 Nov 2024
avatar joomla-cms-bot joomla-cms-bot - change - 28 Nov 2024
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 28 Nov 2024
avatar Hackwar Hackwar - change - 28 Nov 2024
Labels Added: bug
avatar Hackwar Hackwar - labeled - 28 Nov 2024
avatar Hackwar
Hackwar - comment - 28 Nov 2024

I've marked this as bug, since it can be argued that with the switches in the finder plugins this should also control indexing the value for search as well, so we could fix this in 5.2. If it is decided to do this in 5.3, we should also add tags and some other data in there, too.

avatar pixelhexe
pixelhexe - comment - 28 Nov 2024

Thank you @Hackwar! I just tried my first PR - this would be a quite simple bugfix.

As far as I have tested, the author data is automatically indexes - independantly of the taxonomy option "Author" in the smart search plugin. Probably this taxonomy makes only sense with search filters or advanced searching.

My PR is just a proposal and surely needs more testing or other suggestions...

avatar richard67 richard67 - change - 28 Nov 2024
Status New Closed
Closed_Date 0000-00-00 00:00:00 2024-11-28 18:55:10
Closed_By richard67
avatar richard67 richard67 - close - 28 Nov 2024
avatar richard67
richard67 - comment - 28 Nov 2024

Closing as having a pull resuest. See #44554 .

Add a Comment

Login with GitHub to post a comment