code: public final void commit() {
          if (indexQueue == null) {
              luceneIndex.commit();
          } else {
              indexQueue.submitSynchronous(new Runnable() {
                  @Override
                  public void run() {
                      luceneIndex.commit();
                  }
              });
          }
      }
docs: Commits the pending changes. This operation is performed asynchronously.