Remove index schemas earlier than v32

Gerrit 2.13 uses v32, so we need that version to support online
upgrading to 2.14. Older versions are not necessary.

Change-Id: I0e199df540a6f5bdcdf7ecaac97629bb1801307b
This commit is contained in:
Dave Borowitz
2016-09-22 16:18:39 +02:00
parent 142506494e
commit 783dc965b3
10 changed files with 18 additions and 355 deletions

View File

@@ -130,8 +130,6 @@ public class LuceneChangeIndex implements ChangeIndex {
private static final String HASHTAG_FIELD =
ChangeField.HASHTAG_CASE_AWARE.getName();
private static final String STAR_FIELD = ChangeField.STAR.getName();
@Deprecated
private static final String STARREDBY_FIELD = ChangeField.STARREDBY.getName();
static Term idTerm(ChangeData cd) {
return QueryBuilder.intTerm(LEGACY_ID.getName(), cd.getId().get());
@@ -485,9 +483,6 @@ public class LuceneChangeIndex implements ChangeIndex {
if (fields.contains(HASHTAG_FIELD)) {
decodeHashtags(doc, cd);
}
if (fields.contains(STARREDBY_FIELD)) {
decodeStarredBy(doc, cd);
}
if (fields.contains(STAR_FIELD)) {
decodeStar(doc, cd);
}
@@ -577,17 +572,6 @@ public class LuceneChangeIndex implements ChangeIndex {
cd.setHashtags(hashtags);
}
@Deprecated
private void decodeStarredBy(Multimap<String, IndexableField> doc, ChangeData cd) {
Collection<IndexableField> starredBy = doc.get(STARREDBY_FIELD);
Set<Account.Id> accounts =
Sets.newHashSetWithExpectedSize(starredBy.size());
for (IndexableField r : starredBy) {
accounts.add(new Account.Id(r.numericValue().intValue()));
}
cd.setStarredBy(accounts);
}
private void decodeStar(Multimap<String, IndexableField> doc, ChangeData cd) {
Collection<IndexableField> star = doc.get(STAR_FIELD);
Multimap<Account.Id, String> stars = ArrayListMultimap.create();