code: private void indexDocument(HelpModule helpModule, Resource resource) throws Exception {
          String title = getTitle(resource);
          
          try (InputStream is = resource.getInputStream()) {
              Document document = new Document();
              document.add(new TextField("module", helpModule.getLocalizedId(), Store.YES));
              document.add(new TextField("source", helpModule.getTitle(), Store.YES));
              document.add(new TextField("title", title, Store.YES));
              document.add(new TextField("url", resource.getURL().toString(), Store.YES));
              document.add(new TextField("content", tika.parseToString(is), Store.NO));
              writer.addDocument(document);
          }
      }
docs: Index an HTML text file resource.
  
  @param helpModule The help module owning the resource.
  @param resource The HTML text file resource.
  @throws Exception Unspecified exception.