add onprem search reindex
This commit is contained in:
+8
-5
@@ -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
@@ -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
@@ -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
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user