Fix case-insensitive searching of hashtags
The index field has always been stored lowercase, since we intended
hashtag searches to be case-insensitive. However, we never converted the
input string to lower case, with the unexpected result that searching
for [hashtag:ACamelCaseTag] would not return results for changes who
contain that exact hashtag.
Change-Id: I86019d18fd0d183d857d5a91d2af20d3445c6c25
(cherry picked from commit c8d1c47f1f)
This commit is contained in:
committed by
David Pursehouse
parent
cc8e7b5e7f
commit
d9e1b93daa
@@ -20,7 +20,9 @@ import com.google.gwtorm.server.OrmException;
|
||||
|
||||
public class HashtagPredicate extends ChangeIndexPredicate {
|
||||
public HashtagPredicate(String hashtag) {
|
||||
super(ChangeField.HASHTAG, HashtagsUtil.cleanupHashtag(hashtag));
|
||||
// Use toLowerCase without locale to match behavior in ChangeField.
|
||||
// TODO(dborowitz): Change both.
|
||||
super(ChangeField.HASHTAG, HashtagsUtil.cleanupHashtag(hashtag).toLowerCase());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user