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
 | 
			
		||||
  public void run() throws IOException {
 | 
			
		||||
    ui.header("Index");
 | 
			
		||||
 | 
			
		||||
    IndexType type = index.select("Type", "type", IndexType.LUCENE);
 | 
			
		||||
    IndexType type = IndexType.LUCENE;
 | 
			
		||||
    if (IndexType.values().length > 1) {
 | 
			
		||||
      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);
 | 
			
		||||
@@ -65,7 +67,10 @@ class InitIndex implements InitStep {
 | 
			
		||||
    if ((site.isNew || isEmptySite()) && type == IndexType.LUCENE) {
 | 
			
		||||
      // Do nothing
 | 
			
		||||
    } 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"
 | 
			
		||||
        + "  java -jar gerrit.war reindex -d site_path\n",
 | 
			
		||||
        site.isNew ? "" : "re");
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user