Merge remote-tracking branch 'upstream/develop' into block-behavior
[akkoma] / lib / pleroma / activity / search.ex
index cc98e2d06597b4bf88d380432e83ae0adb793188..babf9520ba680398f5c434daebe752dbc78bc7a3 100644 (file)
@@ -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 :persistent_term.get({Pleroma.Repo, :postgres_version}) >= 11 do
+        :websearch
+      else
+        :plain
+      end
 
     Activity
     |> Activity.with_preloaded_object()