Skip to content

Commit 77b7297

Browse files
fix search (#222)
1 parent 723cdf3 commit 77b7297

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/models/document.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ class Document < ApplicationRecord
1212
against: %i[title document],
1313
using: {
1414
tsearch: { prefix: true, dictionary: 'english',
15-
tsvector_column: 'search_vector' } # This option allows partial matches
15+
tsvector_column: 'search_vector',
16+
any_word: true } # This enables OR search - matches any word
1617
}
1718

1819
has_neighbors :embedding

0 commit comments

Comments
 (0)