From 501cdd5edf7962ee807e0b5ac139c74107a01130 Mon Sep 17 00:00:00 2001 From: Alexei Sorokin Date: Fri, 13 Nov 2020 12:50:04 +0300 Subject: [PATCH] do not prepend asterisks before words in search An asterisk is a special FTS4 operator when appended to a word but has no special meaning when prepended. --- src/main/java/eu/siacs/conversations/utils/FtsUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/eu/siacs/conversations/utils/FtsUtils.java b/src/main/java/eu/siacs/conversations/utils/FtsUtils.java index 4a6ccf399..88959c6b2 100644 --- a/src/main/java/eu/siacs/conversations/utils/FtsUtils.java +++ b/src/main/java/eu/siacs/conversations/utils/FtsUtils.java @@ -66,7 +66,7 @@ public class FtsUtils { } else if (term.contains("*") || term.startsWith("-")) { builder.append(term); } else { - builder.append('*').append(term).append('*'); + builder.append(term).append('*'); } } return builder.toString();