Merge "InitIndex should not always set the latest version ready"

This commit is contained in:
David Pursehouse
2016-08-12 02:21:05 +00:00
committed by Gerrit Code Review

View File

@@ -60,12 +60,12 @@ class InitIndex implements InitStep {
ui.header("Index");
type = index.select("Type", "type", type);
}
for (SchemaDefinitions<?> def : IndexModule.ALL_SCHEMA_DEFS) {
AbstractLuceneIndex.setReady(
site, def.getName(), def.getLatest().getVersion(), true);
}
if ((site.isNew || isEmptySite()) && type == IndexType.LUCENE) {
// Do nothing
for (SchemaDefinitions<?> def : IndexModule.ALL_SCHEMA_DEFS) {
AbstractLuceneIndex.setReady(
site, def.getName(), def.getLatest().getVersion(), true);
}
} else {
if (IndexType.values().length <= 1) {
ui.header("Index");