Skip to content
/ gosh Public

Implementing Full Text Search (FTS) in Postgres 🔥

Notifications You must be signed in to change notification settings

SemmiDev/gosh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Implementing Full Text Search (FTS) in Postgres

cover 0

Text search is a common feature many applications have. We usually use this feature on Instagram, Twitter, or any social media to find someone by their account username, first name, or last name. We use this feature to find an address in Google Maps, (Apple) Maps, Waze, or any Map Navigation

Implementing the Full Text Search (FTS) in Postgres is similar to using the LIKE operator, i.e., text query-document matching. In FTS, the text matching is conducted by the operator @@ given <doc_text> as the document and <query_text> as the query, e.g., <doc_text> @@ <query_text>.

Tech Stack

  • Go
  • Fiber
  • PostgreSQL
  • Pgx Pool
  • Fiber Web Socket
  • React JS
  • Tailwind CSS

Screnshoots

ss 1 ss 2

How to Run?

➤ Clone this repo
➤ cd gosh

# setup postgres with dummy data (see: postgres/init.sql)
➤ docker-compose up -d

# install dependencies
➤ go mod tidy

# run backend
➤ go run main.go

# change to frontend
➤ cd gosh

# install dependencies
➤ yarn

# run frontend
➤ yarn dev

# open in browser (http://localhost:5173/)

References

Fast Text Search to Boost User Experience in Kampus Merdeka Platform

About

Implementing Full Text Search (FTS) in Postgres 🔥

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published