How is Discourse Search implemented?

What kind of Search algorithm Discourse uses, for recommending similar topics. Can someone guide me with it, I want to improve it, further.

Discourse relies on Postgresā€™s full text search: PostgreSQL: Documentation: 13: ChapterĀ 12.Ā Full Text Search


Thanks a lot @tgxworld, I will go through PostreSQL: Full text Search, also can u please tell how you came to know that Discourse uses this search mechanism.