From the course: Advanced PostgreSQL
Unlock this course with a free trial
Join today to access over 24,900 courses taught by industry experts.
Using logical operations in search terms - PostgreSQL Tutorial
From the course: Advanced PostgreSQL
Using logical operations in search terms
In this movie, let's perform full text search on the table that we have just created. I select star from online courses where the term learn is present in the title of the course. Observe that the query has to be in the tsquery format. That's why I use two tsquery and the title has to be in the tsvector format and that's why I use two tsvector. The double at operator will perform full text search. Go ahead and execute the search and you'll find a number of records in the result. Note that we searched for the term learn and only in the title of the course, but you can see here that the first four titles, Learning Java, Introduction to Machine Learning, Learning Spring Boot and Learning TensorFlow all contain the word learning and not learn. The term learning in its lexeme format is just learn, and because the tsquery and the vector both use the lexeme format that is the root of the word, these records were all correctly matched. Using lexeme allows PostgreSQL to identify the actual…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
Full-text search5m 30s
-
(Locked)
Basic text search using LIKE and ILIKE2m 27s
-
(Locked)
Tsvector and tsquery1m 56s
-
(Locked)
Performing a full-text search using the @@ operator2m 41s
-
(Locked)
Using logical operations in search terms2m 48s
-
(Locked)
Performing a search using a different language3m 11s
-
(Locked)
Controlling search parameters5m 3s
-
(Locked)
Ranking search results4m 11s
-
(Locked)
Creating and using dictionaries4m 17s
-
-
-
-