0
votes

I'm new here and also in Joomla!, so I have few problems with the Joomla Smart search. Maybe you guys can help me.

  1. Is it possible using Smart search to filter only titles of articles? If yes, how? I mean Smart search would suggest only tittle of article, but NOT every same word of each article (like it does usually).

  2. Is it possible to type words into the search box and when the suggested word (title of article) is suitable, press it and Smart search would send directly to the article in new tab?

Thanks!

2

2 Answers

0
votes

Smart Search is based on finder plugins, so of course you can write your own plugin that will index exactly what you want and how you want.

In your case, it means you have to duplicate and modify the "content" finder plugin (/plugins/finder/content.php).

The second question is a totally different topic, you have to override the "Smart Search Module" so that you can adapt the HTML of the link to your desired behaviour.

0
votes

Found out how to have Smart search not index the description. Simply comment out lines 265 and 266 of /plugins/finder/content/content.php which look like:

$item->summary = FinderIndexerHelper::prepareContent($item->summary, $item->params);
$item->body = FinderIndexerHelper::prepareContent($item->body, $item->params);

Also remove it from the SQL call on line 347 so that it's not calling the description or "body". Basically you want it to look like:

->select('a.id, a.title, a.alias')