aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/user.ex
diff options
context:
space:
mode:
authorIvan Tashkinov <ivantashkinov@gmail.com>2020-06-10 21:02:44 +0300
committerIvan Tashkinov <ivantashkinov@gmail.com>2020-06-10 21:02:44 +0300
commit659e15896e361331a5f7b69aa62bf834d59a0ce4 (patch)
tree657b17182f85bab1b580491bafb4f8ab772f3fac /lib/pleroma/user.ex
parent7aa6c82937090ca6f2298dee0ef894954ca2f129 (diff)
downloadpleroma-1570-levenshtein-distance-user-search.tar.gz
[#1570] Experimental feature to improve user search using Levenshtein distance calculation.1570-levenshtein-distance-user-search
Improves short queries, especially containing typos.
Diffstat (limited to 'lib/pleroma/user.ex')
-rw-r--r--lib/pleroma/user.ex1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/pleroma/user.ex b/lib/pleroma/user.ex
index c5c74d132..f0193207c 100644
--- a/lib/pleroma/user.ex
+++ b/lib/pleroma/user.ex
@@ -92,6 +92,7 @@ defmodule Pleroma.User do
field(:local, :boolean, default: true)
field(:follower_address, :string)
field(:following_address, :string)
+ field(:levenshtein_distance, :integer, virtual: true)
field(:search_rank, :float, virtual: true)
field(:search_type, :integer, virtual: true)
field(:tags, {:array, :string}, default: [])