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
comment the following lines:
// $item->addInstruction(FinderIndexer::META_CONTEXT, 'metaauthor');
// $item->addInstruction(FinderIndexer::META_CONTEXT, 'author');
// $item->addInstruction(FinderIndexer::META_CONTEXT, 'created_by_alias');
empty the search index
reindex
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.
Labels |
Added:
No Code Attached Yet
|
Labels |
Added:
bug
|
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...
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2024-11-28 18:55:10 |
Closed_By | ⇒ | richard67 |
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.