From ae55f0384b02d5779cb4e7f70a3997438360f34e Mon Sep 17 00:00:00 2001 From: Matthew Peveler Date: Wed, 1 May 2024 17:10:03 -0400 Subject: [PATCH] Update trigram word_similarity code example Signed-off-by: Matthew Peveler --- README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 4ccf1562..c9df85d8 100644 --- a/README.md +++ b/README.md @@ -958,16 +958,17 @@ class Sentence < ActiveRecord::Base include PgSearch::Model pg_search_scope :similarity_like, + against: :name, + using: [:trigram] + + + pg_search_scope :word_similarity_like, against: :name, using: { trigram: { word_similarity: true } } - - pg_search_scope :word_similarity_like, - against: :name, - using: [:trigram] end sentence = Sentence.create! name: "Those are two words."