Init: Don't ask for index type when LUCENE is the only choice
Change-Id: I45a8e79718fd8834844d197d2f6990c7eb993000 Signed-off-by: Edwin Kempin <ekempin@google.com>
This commit is contained in:
@@ -55,9 +55,11 @@ class InitIndex implements InitStep {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run() throws IOException {
|
public void run() throws IOException {
|
||||||
|
IndexType type = IndexType.LUCENE;
|
||||||
|
if (IndexType.values().length > 1) {
|
||||||
ui.header("Index");
|
ui.header("Index");
|
||||||
|
type = index.select("Type", "type", type);
|
||||||
IndexType type = index.select("Type", "type", IndexType.LUCENE);
|
}
|
||||||
for (SchemaDefinitions<?> def : IndexModule.ALL_SCHEMA_DEFS) {
|
for (SchemaDefinitions<?> def : IndexModule.ALL_SCHEMA_DEFS) {
|
||||||
AbstractLuceneIndex.setReady(
|
AbstractLuceneIndex.setReady(
|
||||||
site, def.getName(), def.getLatest().getVersion(), true);
|
site, def.getName(), def.getLatest().getVersion(), true);
|
||||||
@@ -65,7 +67,10 @@ class InitIndex implements InitStep {
|
|||||||
if ((site.isNew || isEmptySite()) && type == IndexType.LUCENE) {
|
if ((site.isNew || isEmptySite()) && type == IndexType.LUCENE) {
|
||||||
// Do nothing
|
// Do nothing
|
||||||
} else {
|
} else {
|
||||||
final String message = String.format(
|
if (IndexType.values().length <= 1) {
|
||||||
|
ui.header("Index");
|
||||||
|
}
|
||||||
|
String message = String.format(
|
||||||
"\nThe index must be %sbuilt before starting Gerrit:\n"
|
"\nThe index must be %sbuilt before starting Gerrit:\n"
|
||||||
+ " java -jar gerrit.war reindex -d site_path\n",
|
+ " java -jar gerrit.war reindex -d site_path\n",
|
||||||
site.isNew ? "" : "re");
|
site.isNew ? "" : "re");
|
||||||
|
|||||||
Reference in New Issue
Block a user