[#477] User: FTS and trigram search results mixing (to handle misspelled requests).
This commit is contained in:
parent
0bc6d30f7d
commit
ed8f55ab8e
3 changed files with 87 additions and 59 deletions
|
|
@ -814,6 +814,12 @@ defmodule Pleroma.UserTest do
|
|||
assert [u4.id, u3.id, u1.id] == Enum.map(User.search("lain@ple"), & &1.id)
|
||||
end
|
||||
|
||||
test "finds users, handling misspelled requests" do
|
||||
u1 = insert(:user, %{name: "lain"})
|
||||
|
||||
assert [u1.id] == Enum.map(User.search("laiin"), & &1.id)
|
||||
end
|
||||
|
||||
test "finds users, boosting ranks of friends and followers" do
|
||||
u1 = insert(:user)
|
||||
u2 = insert(:user, %{name: "Doe"})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue