https://faun.pub/a-powerful-full-text-search-in-postgresql-in-less-than-20-lines-bbac8b236b6d Need a full-text search? PostgreSQL is good enough. Give it a try. POSTGRESQL FULL TEXT SEARCH Seeding data In order to explain further the fundamentals of textual search, relevance and results ranking, we have to seed our database with real data and compare different search strategies. Let’s create a table called courses containing only a title and description columns. Those columns will be our "searchable" columns in which we will perform a text search against: CREATE TABLE courses (id SERIAL PRIMARY KEY, title VARCHAR(80) NOT NULL, description VARCHAR(200) NOT NULL); Next, we will populate the table with some dummy data: INSERT INTO courses (title, description) VALUES ('Improve your sales skills', 'A complete course that will help you to improve your sales skills'), ('Intro to Computer Science', 'Understant how computers work'), ('L...
留言
發佈留言