Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.


Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

How to retrieve related articles (Fulltext-search)


2 Posts   2256 Views


19 July 2007 at 8:51pm (Last edited: 19 July 2007 8:51pm), Community Member, 787 Posts

Hi all,

I'm currently trying to figure out a way to get related articles (related to the current article that is) from the database. Normally I would run a match-search on titles, descriptions and keywords (with the current title, description and keywords) and if that didn't produce any hits I'd run a mysql fulltext-search.

Can't seem to figure out how to go about implementing this in SS.

Would someone be so kind to point me in the right direction ? ;-)


20 July 2007 at 12:06am (Last edited: 20 July 2007 12:08am), Community Member, 787 Posts

Kinda' Solved it.

There probably is a better way of doing it (by using the built in search engine for example) but I can't find any docs on it.

I didn't realize I could use Mysql's MATCH .. AGAINST in combination with data-objects.

So I ended up with :

DataObject::get("Page", "MATCH (Title, MenuTitle, Content, MetaTitle, MetaDescription, MetaKeywords) AGAINST ('$this->MetaKeywords')");