aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRoger Braun <roger@rogerbraun.net>2017-09-16 10:50:43 +0200
committerRoger Braun <roger@rogerbraun.net>2017-09-16 10:50:43 +0200
commit73bdfd6c2b92533b5d48c2801a8e6548e8a2551a (patch)
tree97bc19692e913ef249233c1739ff3b2ac101a7db /lib
parent9f0a2a714b498edfbacc638fa79e06e3a8dc4d04 (diff)
downloadpleroma-73bdfd6c2b92533b5d48c2801a8e6548e8a2551a.tar.gz
Set search config to 'english'.
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/web/mastodon_api/mastodon_api_controller.ex4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex b/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex
index 6b84d732f..fcc87d414 100644
--- a/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex
+++ b/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex
@@ -289,13 +289,13 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
def search(%{assigns: %{user: user}} = conn, %{"q" => query}) do
q = from u in User,
- where: fragment("(to_tsvector(?) || to_tsvector(?)) @@ plainto_tsquery(?)", u.nickname, u.name, ^query),
+ where: fragment("(to_tsvector('english', ?) || to_tsvector('english', ?)) @@ plainto_tsquery('english', ?)", u.nickname, u.name, ^query),
limit: 20
accounts = Repo.all(q)
q = from a in Activity,
where: fragment("?->>'type' = 'Create'", a.data),
- where: fragment("to_tsvector(?->'object'->>'content') @@ plainto_tsquery(?)", a.data, ^query),
+ where: fragment("to_tsvector('english', ?->'object'->>'content') @@ plainto_tsquery('english', ?)", a.data, ^query),
limit: 20
statuses = Repo.all(q)