add onprem search reindex

This commit is contained in:
Pete Matsyburka
2025-06-21 22:52:10 +03:00
parent 47b235dc5f
commit 35852ef6ab
10 changed files with 48 additions and 9 deletions
+8 -5
View File
@@ -73,12 +73,15 @@ module Docuseal
@default_pkcs ||= GenerateCertificate.load_pkcs(Docuseal::CERTS)
end
def fulltext_search?(_user)
return false unless SearchEntry.table_exists?
return true if Docuseal.multitenant?
return true if Rails.env.local?
def fulltext_search?
return @fulltext_search unless @fulltext_search.nil?
false
@fulltext_search =
if SearchEntry.table_exists?
Docuseal.multitenant? ? true : AccountConfig.exists?(key: :fulltext_search, value: true)
else
false
end
end
def enable_pwa?
+1 -1
View File
@@ -8,7 +8,7 @@ module Submissions
module_function
def search(current_user, submissions, keyword, search_values: false, search_template: false)
if Docuseal.fulltext_search?(current_user)
if Docuseal.fulltext_search?
fulltext_search(current_user, submissions, keyword, search_template:)
else
plain_search(submissions, keyword, search_values:, search_template:)
+1 -1
View File
@@ -14,7 +14,7 @@ module Submitters
module_function
def search(current_user, submitters, keyword)
if Docuseal.fulltext_search?(current_user)
if Docuseal.fulltext_search?
fulltext_search(current_user, submitters, keyword)
else
plain_search(submitters, keyword)
+1 -1
View File
@@ -38,7 +38,7 @@ module Templates
end
def search(current_user, templates, keyword)
if Docuseal.fulltext_search?(current_user)
if Docuseal.fulltext_search?
fulltext_search(current_user, templates, keyword)
else
plain_search(templates, keyword)