class TextIndexCreator {

  private void index(File outputDir, String[] inputFiles) throws IOException {
    Analyzer analyzer = new StandardAnalyzer(CharArraySet.EMPTY_SET);
    IndexWriterConfig config = new IndexWriterConfig(analyzer);
    try (FSDirectory directory = FSDirectory.open(outputDir.toPath());
         IndexWriter indexWriter = new IndexWriter(directory, config)) {
      for (String inputFile : inputFiles) {
        indexFile(indexWriter, inputFile);
      }
    }
  }

  private void indexFile(IndexWriter indexWriter, String inputFile) throws IOException {<FILL_FUNCTION_BODY>}

  public static void main(String[] args) throws IOException {
    if (args.length < 2) {
      System.out.println("Usage: " + TextIndexCreator.class.getSimpleName() + " <outputDir> <inputFile...>");
      System.exit(0);
    }
    TextIndexCreator creator = new TextIndexCreator();
    File outputDir = new File(args[0]);
    if (outputDir.exists()) {
      throw new RuntimeException("Output directory already exists: " + outputDir);
    }
    creator.index(outputDir, Arrays.copyOfRange(args, 1, args.length));
  }
  
}

    System.out.println("Indexing " + inputFile);
    int lineCount = 0;
    try (Scanner scanner = new Scanner(new File(inputFile))) {
      while (scanner.hasNextLine()) {
        String line = scanner.nextLine();
        Document doc = new Document();
        doc.add(new TextField(Lucene.FIELD_NAME, line, Field.Store.YES));
        doc.add(new TextField(Lucene.FIELD_NAME_LOWERCASE, line.toLowerCase(), Field.Store.YES));
        indexWriter.addDocument(doc);
        if (++lineCount % 10_000 == 0) {
          System.out.println(lineCount + "...");
        }
      }
    }
  
<no_super_class>