Skip to content

Commit

Permalink
fix: [bug] search containing "-" gives no results in people page - EX…
Browse files Browse the repository at this point in the history
…O-74310 - Meeds-io/meeds#2410 (#4055)

Prior to this change, searching for users using advanced filter with
keyword containing "-" gives no result more", The commit fix this bug by
correcting ES query generated from the keyword.
  • Loading branch information
mkrout authored Sep 24, 2024
1 parent ce168b3 commit badd56c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -573,9 +573,9 @@ private static String removeAccents(String string) {
}

public static String removeESReservedChars(String string) {
String [] ES_RESERVED_CHARS = new String []{"","+","-","=","&&","||",">","<","!","(",")","{","}","[","]","^","\"","~","*","?",":","\\","/"};
String [] ES_RESERVED_CHARS = new String []{"+","-","=","&&","||",">","<","!","(",")","{","}","[","]","^","\"","~","*","?",":","\\","/"};
for(String c : ES_RESERVED_CHARS) {
string = string.replace(c, "");
string = string.replace(c, " ");
}
return string;
}
Expand Down

0 comments on commit badd56c

Please sign in to comment.