While Ie82c014e0 introduced case-insensitive by email search for
reviewers, it also introduced a bug by returning the lower-cased email
to the client. In case when an email for an account contained upper-case
letter(s), this account couldn't be added as a reviewer by selecting it
from the suggested list of accounts because its email (as received from
the suggest reviewers REST call) was lowercased and Gerrit couldn't find
such an account when adding the reviewer.
The Ie82c014e0 already stored both original and lowercased email fields
in the index, it just did it in a wrong order. Lucene's
Document.get(fieldName) returns the first value of the field when there
are multiple values. To fix the issue swap to order of the lower-cased
and original-case values for the EMAIL field in the index.
Change-Id: I4d9025810252641028288d961a1f9e62dd7b8e3e