Search: Change search method based on detected pg version
This commit is contained in:
parent
a407e33c78
commit
9a1e5f5d48
2 changed files with 11 additions and 5 deletions
|
|
@ -19,7 +19,12 @@ defmodule Pleroma.Activity.Search do
|
|||
offset = Keyword.get(options, :offset, 0)
|
||||
author = Keyword.get(options, :author)
|
||||
|
||||
search_function = Pleroma.Config.get([:instance, :search_function], :plain)
|
||||
search_function =
|
||||
if Application.get_env(:postgres, :version) >= 11 do
|
||||
:websearch
|
||||
else
|
||||
:plain
|
||||
end
|
||||
|
||||
Activity
|
||||
|> Activity.with_preloaded_object()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue