kanezi
kanezi
  • 25
  • 66 324
Postgres Full Text Search
Video explores PostgreSQL full text search capabilities, creating and indexing text documents and providing search capabilities.
Postgres introduces two new datatypes to support full test search, tsvector and tsquery.
Tsvector represents document in form suitable for searching and tsquery a predicate that documents you’re searching on needs to satisfy.
Postgres also supports misspelling suggestions with pg_trgm trigram extension and synonyms searches by dictionary and search configuration extension.
To make you searches performant we’ll use indexes on search columns.
Finally, we demonstrate search concepts in action on java spring boot demo web app.
github link:
github.com/kanezi/postgres-fts
00:00 - intro
00:27 - full text search
01:45 - lucene index & search
02:16 - sample pg project
03:56 - pg regular text search operators
06:14 - pg full text search parts
07:27 - tsvector
09:30 - stop words
11:02 - unnacent
11:30 - parsing and translating
12:48 - tsquery
14:49 - @@ operator
16:00 - || && operators
16:59 - ranking
18:59 - ts_headline
19:44 - synonyms
21:00 - indexing
25:50 - select for web ui
27:14 - synonyms
30:49 - java spring app example
32:48 - outro
มุมมอง: 3 509

วีดีโอ

understand Database A.C.I.D. so you don't get burned
มุมมอง 1229 หลายเดือนก่อน
ACID, in computer science is a set of properties of database transactions intended to provide safety guarantees needed for business data processing, typical use case being financial transaction processing, where the transaction term was borrowed from. Each letter in a well known acronym ACID, which stands for Atomicity, Consistency, Isolation, Durability represents four major guarantees of the ...
Oauth2 and Oidc for JavaScript SPAs | via Google and GitLab
มุมมอง 3209 หลายเดือนก่อน
We'll explore details of oauth2 and open id protocols for JavaScript Single Page Applications (SPAs). We'll see what problems do they solve and what is their purpose. We'll explain different types of tokens exchanged in the protocols, access, id, refresh tokes and explore their format. Specifically we'll go into detail about JWT JSON web token format for id tokens (and sometimes access tokens)....
Deploy apps to Clever Cloud | Docker | Spring | PostgreSQL | Redis | S3
มุมมอง 1.1K11 หลายเดือนก่อน
Clever cloud is hosting provider that supports various runtime environments, like node, java, ruby, as well as host of add-ons including relational databases, like PostgreSQL, Redis in memory store, cellar (amazon s3 compatible file storage service), etc. We'll deploy two apps to clever cloud and show how to incorporate deployment into GitHub ci/cd workflow environment. First app will be spring...
Host apps on Render.com | spring | docker | postgres | redis
มุมมอง 9K11 หลายเดือนก่อน
We'll demonstrate how to use cloud provider render.com to host java spring apps, postgres database and Redis in-memory key value store. Although java runtime and spring apps are not supported directly, render gives ability to create web services based on docker images. We'll show how to use hooks to automate deployment and blueprints to automatically provision and connect related services. We'l...
GitHub actions for Java CI automation
มุมมอง 64911 หลายเดือนก่อน
GitHub actions is automation feature of GitHub platform enabling CI/CD and other automation workflows. In this video we showcase various features of GitHub actions. We implement CI pipelines that publish package to GitHub Maven package registry. We also implement workflow that creates Docker image from Java Spring application and publishes image to Docker Hub and GitHub Container registry. Grad...
JVM project versioning with JGitVer
มุมมอง 317ปีที่แล้ว
How to version JVM platform projects that use Maven or Gradle as build tool and Git version control using JGitVer set of plugins and library. 00:00 - intro 00:32 - git history polution 01:25 - version collision 03:42 - what is jgitver 04:38 - maven example 08:57 - maven vs gradle version naming 11:29 - outro
GitLab CI/CD - Deep Dive
มุมมอง 1.1Kปีที่แล้ว
Deep dive into GitLab platform ci/cd features. We explore what CI/CD is. What continuous integration is and what is the difference between continuous delivery and continuous deployment. What does the architecture of GitLab platform look like and what is the role of gitlab-runners? How does GitLab compares to GitHub and Jenkins? We'll go through series of examples where we push artifact to gitla...
Monitoring and Metrics for Spring | with Prometheus - Grafana - Actuator
มุมมอง 10Kปีที่แล้ว
A look at how to provide meta data about spring boot application using actuator library. How to expose metrics for web app using Micrometer facade library. How to use Prometheus system monitoring tool to pull data from java spring web application. How to scrape data from Postgres database using postgres exporter. How to visualize gathered data with Grafana visualization tool using graphs and da...
ChatGPT - AI assistant for developers
มุมมอง 56ปีที่แล้ว
A look at how ChatGpt, AI chatbot from OpenAI, can help with answering programming questions. Where it shines and where i breaks down...
UI test automation
มุมมอง 264ปีที่แล้ว
How do we test web UI in our spring Web applications? We need test automation tools that can record and repeat given steps. In this video we'll present selenium automation framework and it's surrounding infrastructure. To test our spring project we'll use Selenide testing library build on top of Selenium. To enable testing in Gui-less CI/CD environments we'll integrate our UI tests with Testcon...
Testing pyramid in Spring Web apps | Unit - Integration - Functional - e2e
มุมมอง 377ปีที่แล้ว
Different types of test explained on the example of java Spring web application. What is the purpose and how to create unit, integration, functional and e2e (end to end) tests using spring provided testing facilities. 00:00 - intro 02:29 - first unit test 05:02 - service unit test 10:55 - integration tests 15:23 - Controllers 19:52 - Sign up integration test 26:47 - functional and e2e tests 28:...
Spring boot starter testing toolkit explained
มุมมอง 469ปีที่แล้ว
We'll explore 4 basic testing libraries included by default with every spring boot project: Junit5, AssertJ, hamcret and mockito. We'll discuss their role in spring testing ecosystem, connection with build tools/IDE's and look at usage examples. 00:00 - intro 00:26 - Junit5 04:05 - hamcrest and AssertJ 09:57 - build tools 11:26 - Junit Jupiter extension model 12:39 - mockito 17:06 - outro
DataBase testing with Testcontainers | use Production DB in Spring tests
มุมมอง 498ปีที่แล้ว
How to use Testcontainers library in java spring apps during tests to spin up database infrastructure identical to our production? How do we make sure our test are isolated and don't interfere with each other? How do we load test data for our tests? Github repo: github.com/kanezi/spring-social-2-cloud 00:00 - intro 02:10 - testcontainer dependencies 03:19 - @DataJpaTest 05:36 - @Testcontainers ...
Data Persistence in Spring Apps | provision PostgreSQL DB locally via Docker and in Cloud
มุมมอง 617ปีที่แล้ว
Part 6 of spring social 2 cloud series. In this part we'll add relational database support, connect our app to PostgreSQL database and persist our user. We'll use docker to spin up local instance of database. We'll provision PostgreSQL database with our cloud provider railway.app and connect our deployed app to provisioned database. We'll explore ORM - Object relational features of JPA - Jakart...
CI/CD for database - 2 devops tools for DB versioning and migration | liquibase and flyway
มุมมอง 9Kปีที่แล้ว
CI/CD for database - 2 devops tools for DB versioning and migration | liquibase and flyway
How to reduce Java verbosity and boilerplate | using lombok and records
มุมมอง 193ปีที่แล้ว
How to reduce Java verbosity and boilerplate | using lombok and records
Exploring The Backstory of Reactive UI vs Blocking WEB
มุมมอง 263ปีที่แล้ว
Exploring The Backstory of Reactive UI vs Blocking WEB
The Beginner's Guide To Spring Relational Data Support
มุมมอง 189ปีที่แล้ว
The Beginner's Guide To Spring Relational Data Support
Form submission and validation in Spring MVC
มุมมอง 1Kปีที่แล้ว
Form submission and validation in Spring MVC
Customizing login experience in Spring MVC web apps
มุมมอง 4.9Kปีที่แล้ว
Customizing login experience in Spring MVC web apps
up to speed with Thymeleaf in 1 hour | for spring mvc web apps
มุมมอง 950ปีที่แล้ว
up to speed with Thymeleaf in 1 hour | for spring mvc web apps
OAuth2 client sign in for Spring web apps | via Google and Github
มุมมอง 17Kปีที่แล้ว
OAuth2 client sign in for Spring web apps | via Google and Github
Spring security architecture overview | for web apps
มุมมอง 1.9Kปีที่แล้ว
Spring security architecture overview | for web apps
Deploy spring web apps to cloud | using Railway.app
มุมมอง 2.6Kปีที่แล้ว
Deploy spring web apps to cloud | using Railway.app

ความคิดเห็น

  • @fabsync
    @fabsync หลายเดือนก่อน

    fantastic video! It will be nice to see a practical project built with this.. like searching pdf content or a library.. etc

  • @ole-jakobolsen3800
    @ole-jakobolsen3800 หลายเดือนก่อน

    If I could give you more than one of both thumbs ups and github stars, I would. Epic.

    • @kanezi
      @kanezi หลายเดือนก่อน

      much appreciated!!!

  • @Jubel357
    @Jubel357 หลายเดือนก่อน

    Explained very well for a quick difference between the two and how they are used. Thank you.

  • @AZIARGROUS
    @AZIARGROUS หลายเดือนก่อน

    Great content, thorough and well delivered. Subscribed.

    • @kanezi
      @kanezi หลายเดือนก่อน

      I'm glad it was helpful

  • @MilsonPazienza
    @MilsonPazienza 3 หลายเดือนก่อน

    Amazing contect I will try it later

  • @FantomIT-888
    @FantomIT-888 3 หลายเดือนก่อน

    mysql ??

    • @kanezi
      @kanezi 3 หลายเดือนก่อน

      mysql is available as reneder disk: docs.render.com/deploy-mysql For postgres reneder offers more out of the box features, like backup and recovery

    • @FantomIT-888
      @FantomIT-888 3 หลายเดือนก่อน

      Thanks ! I already connected the application to postgres, it was easier that way@@kanezi

  • @user-re3qd6oe1g
    @user-re3qd6oe1g 3 หลายเดือนก่อน

    hi sir, i'm having a probem with: alter table book add column fts_doc tsvector generated always as ( setweight(to_tsvector('english', title), 'A') || setweight(to_tsvector('simple', description), 'A') ) stored; =>> And the fts_doc result is: "''educational':6A 'ending':5A 'happy':4A 'motivation':3A 'strong':2A" but i think it should be "'educ':6A 'end':5A 'happi':4A'motiv':3A 'strong':2A" => This result comes from: select setweight(to_tsvector('Be Strong, Motivation, Happy Ending, Educational'), 'A') Why is it? Is there anything wrong that makes the diffrence?

    • @kanezi
      @kanezi 3 หลายเดือนก่อน

      in your fts_doc column part "to_tsvector('simple', description)" uses "simple" configuration that leaves the words as is, and just tokenizes description. Try using to_tsvector('english', description) instead.

  • @AbdulKhan-pk5jd
    @AbdulKhan-pk5jd 3 หลายเดือนก่อน

    Great content ever seen before which covers a lot of things. Thanks a lot @Kanezi. Need some info as I am having one doubt for JWT token based authentication. For example I am having Employee Login and Logout functionality with create and update as well. I am using Thymeleaf as UI. I want to apply JWT based authentication for these end points. I am having filter class where checking the AuthHeader and Bearer token from each request. But how to send the Authorization header from any request to controller from thymeleaf pages, so that it will pass through filter and filter will validate and authenticate each request and save authentication Object in Security Context. Please suggest any thoughts.

  • @abidiabdelbaset1920
    @abidiabdelbaset1920 3 หลายเดือนก่อน

    So much information that I looking for, found it hear thank y so much. Just one question Sir. iam nw with docker and docker hub compose and all of these things. I have a Spring Boot app that connect to Postgres DB . how can I create ONE image and push it to docker hub so that wann i pull it and run it . Will Work. (I hope that y understand what I want to do).

    • @kanezi
      @kanezi 3 หลายเดือนก่อน

      you want postgres and spring boot app in one docker image? It can be done by building an image with all necessary software installed, but it's not a recommended docker way. Docker way are atomic images that you can combine with other services, so one image for database and another for your spring app. You can user docker compose to spin up both containers and run them with one command. I might do a video on the topic to explain it better

    • @abidiabdelbaset1920
      @abidiabdelbaset1920 3 หลายเดือนก่อน

      yes, it would help me a lot, thank y so much. All the TH-cam videos explains how to create this just locally but now one explain how to push the two images (for Continues integration) to docker hub and after pull them still can connect two each other. As i already said am new with Docker so I hope my Question is not stupid. i Just want to push all these things to docker hub and pull it from other machine and run it@@kanezi

    • @kanezi
      @kanezi 3 หลายเดือนก่อน

      @@abidiabdelbaset1920if you want to know how to create and push images to docker hub or other registries for ci, have a look at my github and gitlab ci/cd videos - playlist: th-cam.com/play/PLLhgRnf2WBVQxHnSEGPEh9h5lppcMrNw_.html

  • @user-fj1ym4fk6s
    @user-fj1ym4fk6s 3 หลายเดือนก่อน

    Very professional video, really helps!!

  • @thrasosthrasos7353
    @thrasosthrasos7353 4 หลายเดือนก่อน

    great content, thanks for your effort.

  • @tejassharma2006
    @tejassharma2006 5 หลายเดือนก่อน

    Thanks man!

  • @user-re3qd6oe1g
    @user-re3qd6oe1g 5 หลายเดือนก่อน

    In your java spring app example, the search-word is "albert -einstein life" and the result does not match the whole search-word (without the word " -einstein"). Can you please answer why the app still gives back search result? I am having problems with search-word from users that does not have in the tsvector-column (in this case, my app will show zero result). Thank you!

    • @kanezi
      @kanezi 5 หลายเดือนก่อน

      is your question why search: "albert -einstein life" on the beginning of tutorial gives results? Why do I get results Albert + life, but also only Albert and only life?

    • @user-re3qd6oe1g
      @user-re3qd6oe1g 5 หลายเดือนก่อน

      Thanks for your reply. Yes, that is my question, my Postgres FTS only gives results if all the search words are in ts_vector. What i want is to still recieve results even if there are some missing keywords like your example (2/3 searchword not 3/3). Thanks.

    • @kanezi
      @kanezi 5 หลายเดือนก่อน

      how are you searching on ts_vector column / converting to ts_query? In my case I'm using "document@@ websearch_to_tsquery(:q)". I'm using postgres build in function "websearch_to_tsquery" to convert user input to ts_query. Have a look at repository in video description for query example - FtsDocumentRepository class.

  • @vikramhpt
    @vikramhpt 5 หลายเดือนก่อน

    Very informative and helpful, Thankyou for detailed explanation.

  • @andriiuharov8442
    @andriiuharov8442 6 หลายเดือนก่อน

    Thank you for a great job!

  • @undefined24
    @undefined24 6 หลายเดือนก่อน

    Such an in-depth explanation, very informative, keep it up, sir!

  • @xade8381
    @xade8381 6 หลายเดือนก่อน

    thanks for comprehensive guide

  • @quannguyenviet398
    @quannguyenviet398 6 หลายเดือนก่อน

    thanks for sharing

  • @yormanaguirre8509
    @yormanaguirre8509 7 หลายเดือนก่อน

    Really well explained!

  • @mbhambhu3624
    @mbhambhu3624 7 หลายเดือนก่อน

    hey great tutorial. Could you please extend this tutorial with react where user can login using frontend (user/email, google and github) and the backend is protect by spring oath 2. In the whole internet, i can not find that easily. most of them either fronetend only or backend only.

  • @Tulut
    @Tulut 7 หลายเดือนก่อน

    Awesome! Can I follow your tutorial using Eclipse IDE and MySQL as the database manager?

    • @kanezi
      @kanezi 7 หลายเดือนก่อน

      yes, you can use eclipse! railway also supports MySql, so yes, you can use MySql. You'll need to change database url and docker compose database service to use MySql in development as well.

  • @nkwejusticemapoulo2208
    @nkwejusticemapoulo2208 7 หลายเดือนก่อน

    This video is a game-changer for me! I appreciate the effort you put into breaking down complex topics into easily digestible information. 😊 Keep up the fantastic work!

    • @kanezi
      @kanezi 7 หลายเดือนก่อน

      very kind words! thank you!

  • @zvolo
    @zvolo 7 หลายเดือนก่อน

    great in depth gitlab tutorial, thank you

  • @arnaudpoutieu1331
    @arnaudpoutieu1331 8 หลายเดือนก่อน

    Many thanks for your help to us. Gratitudes!!!

  • @javajavelin1
    @javajavelin1 8 หลายเดือนก่อน

    This video is indeed a great start to learn the spring security. I've watched plenty of videos available on TH-cam. But not a single video makes much sense to me, and somehow, I lost my track somewhere in between and didn't completed any one of it. Here, you'll get the chance to see the architecture and a small implementation of it as well. And when explaining architecture, you'll see that the author takes you to the direct source, which is spring security docs. Explain the architectural diagram and then sum up the session by doing a small debug session and relate it to the architectural diagram. I'm so glad to found this great channel. And looking forward for the more amazing content here. Thanks a lot, Kanezi.

    • @kanezi
      @kanezi 8 หลายเดือนก่อน

      I'm glad video was helpful and, of course, glad you found the channel!

  • @samtx
    @samtx 8 หลายเดือนก่อน

    Signoz does traces logs metrics

  • @geraldmaale
    @geraldmaale 8 หลายเดือนก่อน

    This was an intuitive demonstration. Thank you ❤❤

  • @gospher6342
    @gospher6342 8 หลายเดือนก่อน

    Man, this is a treasure! please keep doing more advanced stuff like this!

    • @kanezi
      @kanezi 8 หลายเดือนก่อน

      thanks, I'll try! I'm also open for topic suggestions...

  • @WIZOVSKI
    @WIZOVSKI 8 หลายเดือนก่อน

    Your videos are great! Thank you very much!

  • @arnaudpoutieu1331
    @arnaudpoutieu1331 8 หลายเดือนก่อน

    Thanks for such insightful content. Real enterprise grade stuff. Gratitudes!!!

    • @kanezi
      @kanezi 8 หลายเดือนก่อน

      Glad you find it helpful!

  • @victorvilar8371
    @victorvilar8371 8 หลายเดือนก่อน

    Amazing video, explained everything step by step slowly.

  • @jwslanhaka941
    @jwslanhaka941 9 หลายเดือนก่อน

    could you make a video where you connect OAuth2 with springboot as backend and then use like react only as frontend, and use REST api call to login trough the springboot backend which communicates with OAUTH2.

    • @kanezi
      @kanezi 9 หลายเดือนก่อน

      yes, I have plans to publish spring boot backend + angular/vue/react frontends tutorials. hopefully I'll get them out this year...

  • @yasarchavez
    @yasarchavez 9 หลายเดือนก่อน

    Thanks you!

  • @rbhaskar902
    @rbhaskar902 9 หลายเดือนก่อน

    Hi Kanezi, My frontend and backend are on different ports, spring boot 3.1.0 using for backend. can you please explain how to configure spring security for google oauth and normal login.

    • @kanezi
      @kanezi 9 หลายเดือนก่อน

      yes, I will in near future! In the meantime, I suggest you take a look at keycloak single sign-on open source server. You can configure normal and google login with keycloak, and they have frontend and backend libraries you can integrate with

  • @julesruzindana-rukundo6254
    @julesruzindana-rukundo6254 10 หลายเดือนก่อน

    Hello is it possible to store files/folders (server) in a multiuser app so that only users with certain roles or only the owner can access it read/modify after. How to do this in springboot. A similar project would help me but I can't find any on github. Can you help me?

    • @kanezi
      @kanezi 10 หลายเดือนก่อน

      yes it's possible, I can create a small example for you, but what are you having trouble with? a) how to secure a method? b) how to store files? For a) most simple way is that you injecting user into read / modify methods with (@AuthenticationPrincipal User user) and then check in method that login in user created the file before you proceed. Alternative is to annotate your method with @PreAuthorize and declaratively specify restrictions: i.e. with this annotations only admins can modify @PreAuthorize("hasAuthority('admin')") For b) where do you need to store files? You can store them as blob's in database, in s3 buckets, etc..

    • @julesruzindana-rukundo6254
      @julesruzindana-rukundo6254 9 หลายเดือนก่อน

      yes sir an example would greatly help me and to answer your question.Well its b and i think blob's in database is more in line with my level in spring framework as of now.thank you @@kanezi

  • @user-mm4qj8lg3w
    @user-mm4qj8lg3w 10 หลายเดือนก่อน

    Thank you for a clear overview of these components. Very helpful.

  • @adekakz9794
    @adekakz9794 10 หลายเดือนก่อน

    U r the best!

  • @norman8084
    @norman8084 10 หลายเดือนก่อน

    😉 *PromoSM*

  • @bitscoder
    @bitscoder 10 หลายเดือนก่อน

    Thank you @Kanezi for the awesome videos. I am having issue, i am not able to connect to postgre db using DBeaver application, I followed all the steps as illustrated in this video, when i try testing the connection, i get 'FATAL: password authentication failed for user "user"'

    • @kanezi
      @kanezi 10 หลายเดือนก่อน

      Hard to say what went wrong, could be multiple things... Maybe database wasn't started properly? Did you start docker services with "docker compose up"? (you can find docker-compose.yml in the root of git project) Can you verify that docker started postgres container?

  • @SouhaibD
    @SouhaibD 10 หลายเดือนก่อน

    Awesome! Thanks for your top-notch videos.

    • @kanezi
      @kanezi 10 หลายเดือนก่อน

      Glad you like them!

  • @_elJotita
    @_elJotita 11 หลายเดือนก่อน

    very good content mate. Thank you for sharing. U gained a sub! cheers from south america !

    • @kanezi
      @kanezi 11 หลายเดือนก่อน

      thank you! welcome to our familia!

  • @udaykiran557
    @udaykiran557 11 หลายเดือนก่อน

  • @skh551
    @skh551 11 หลายเดือนก่อน

    Excellent explanation

  • @harshwardhanparmar8258
    @harshwardhanparmar8258 11 หลายเดือนก่อน

    Amazing content

  • @Jacker3331
    @Jacker3331 11 หลายเดือนก่อน

    Why everyone is making tutorials of socal login with thymeleaf and static spring resources WTF.. 2023 and I cant find tutorial for regular Spring rest api social login

    • @kanezi
      @kanezi 11 หลายเดือนก่อน

      I got you, java backend rest social login + js frontend tutorials will be on the channel in 2023! I plan to showcase more features, like password reset so it's more involved to do

  • @richardoteri9746
    @richardoteri9746 11 หลายเดือนก่อน

    Just found out about your videos. Amazing work, thank you.

    • @kanezi
      @kanezi 11 หลายเดือนก่อน

      thanks for the kind words! glad you like them!

  • @rowland_kanu
    @rowland_kanu 11 หลายเดือนก่อน

    Wow. I discovered this channel today. I'm yet to take my first app to production but im learning a lot already.

    • @kanezi
      @kanezi 11 หลายเดือนก่อน

      Welcome aboard! It so fulfilling to help someone! By creating these videos, I learned a lot too!

  • @juanalfonso60
    @juanalfonso60 ปีที่แล้ว

    Very good video, can you make a video of your liquibase installation? I had problems installing on my ubuntu 22.04

    • @kanezi
      @kanezi ปีที่แล้ว

      did you go with steps in their official installation guide? docs.liquibase.com/start/install/liquibase-linux.html they have Troubleshooting part as well: docs.liquibase.com/start/install/liquibase-installation-troubleshooting.html

    • @juanalfonso60
      @juanalfonso60 ปีที่แล้ว

      @@kanezi yes the same but I get an error that it can't find the postgresql jar in the temporary folder

    • @kanezi
      @kanezi ปีที่แล้ว

      liquibase installation should come with postgresql.jar driver in liquibase/internal/lib if it's not there, try to download postgres driver from: jdbc.postgresql.org/download/ and put it into liquibase/lib folder. Also check your liquibase.properties file in your project. You can set "classpath" key to point to database jar - maybe it points to non existing temporary folder?

  • @lahirusandaruwan63
    @lahirusandaruwan63 ปีที่แล้ว

    Great video! ❤ Looking forward to more tutorials from you!

  • @oinohudsonobai3721
    @oinohudsonobai3721 ปีที่แล้ว

    You are one of the best Java channels on TH-cam for anyone building production grade applications. I really appreciate your content.

    • @kanezi
      @kanezi ปีที่แล้ว

      thank you! support like this motivates me to continue producing content!