mirror of
https://github.com/docusealco/docuseal
synced 2026-11-04 14:42:32 -05:00
add ngram
This commit is contained in:
1 parent
b6a1a3ee4d
commit
700184f776
6 files changed
+114
-27
No files matched your search
@@ -0,0 +1,14 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class AddNgramToSearchIndex < ActiveRecord::Migration[8.0]
|
||||
def change
|
||||
add_column :search_entries, :ngram, :tsvector
|
||||
|
||||
add_index :search_entries, %i[account_id ngram], using: :gin, where: "record_type = 'Submitter'",
|
||||
name: 'index_search_entries_on_account_id_ngram_submitter'
|
||||
add_index :search_entries, %i[account_id ngram], using: :gin, where: "record_type = 'Submission'",
|
||||
name: 'index_search_entries_on_account_id_ngram_submission'
|
||||
add_index :search_entries, %i[account_id ngram], using: :gin, where: "record_type = 'Template'",
|
||||
name: 'index_search_entries_on_account_id_ngram_template'
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user