1

I have Joomla version 3.6.5 and Content Smart search version 3.0.0.

When we write author name in search box it will display articles written by that author. I want to stop this search. e.g. article search by author name.

I have tried as given here:

https://www.templatemonster.com/help/joomla-3-x-how-to-configure-smart-search.html#gref

https://www.ostraining.com/blog/joomla/smart-search/

I have create search filter with de-selected authors list and I have module with smart search, at there, I have select in search filter created in Components -> Smart Saerch -> Search Filter.

enter image description here

enter image description here

And search field in menu, I have selected this module. from IceMegaMenu Module.

enter image description here

But this not stopped search articles by author name.

I have also tried removing authors from content maps, but this also couldn't help.

I have also review this. As given solution here, I have to change in code, Is it true?

Please suggest right solution.

Thanks.

1
  • Just to add to this discussion, these changes would best be done in clones of the affected plugins so that you don't lose your changes the next time the core plugins are updated.
    – LiamHanks
    Feb 9, 2018 at 19:17

1 Answer 1

1

I was having the exact same problem... the indexer was including Author names on the smart search indexed content.

The only way that I could overcome this, was changing the indexer code, and commenting the code block responsible for Author's data.

Base_path/Plugins/Finder

Take a look at categories/categories.php and content/content.php files. They both have the index function.

I commented the following lines: (content.php)

// $item->addInstruction(FinderIndexer::META_CONTEXT, 'metaauthor');
// $item->addInstruction(FinderIndexer::META_CONTEXT, 'author');
// $item->addInstruction(FinderIndexer::META_CONTEXT, 'created_by_alias');      
// Add the author taxonomy data.
if (!empty($item->author) || !empty($item->created_by_alias)) {
//          $item->addTaxonomy('Author', !empty($item->created_by_alias) ? $item->created_by_alias : $item->author);
}

And on categories.php:

// Add the meta-author.
//  $item->metaauthor = $item->metadata->get('author');

// Handle the link to the meta-data.
$item->addInstruction(FinderIndexer::META_CONTEXT, 'link');
$item->addInstruction(FinderIndexer::META_CONTEXT, 'metakey');
$item->addInstruction(FinderIndexer::META_CONTEXT, 'metadesc');
// $item->addInstruction(FinderIndexer::META_CONTEXT, 'metaauthor');
// $item->addInstruction(FinderIndexer::META_CONTEXT, 'author');

After that, clean your index and start again.

The only problem that I found, but hadn't time enough to troubleshoot was that the indexed content stopped appearing on smart search admin > indexed content list.

But if you try searching on your frontend, everything will work and authors gonna be skipped from search.

When I find how to fix this problem, i'll let you know.

2
  • Thanks for the reply :) I will try this solution and get back to you.
    – herr
    Dec 5, 2017 at 13:06
  • If you want to skip TAG authors as well, do the same changes in the tag/tag.php file. Dec 11, 2017 at 20:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.