code: private static TermvectorNumberBasic computeTermvectorNumberBasic(
        TermsEnum termsEnum, LeafReader r) throws IOException {
      TermvectorNumberBasic result = new TermvectorNumberBasic();
      boolean hasDeletedDocuments = (r.getLiveDocs() != null);
      if (!hasDeletedDocuments) {
        result.valueSum[0] = termsEnum.totalTermFreq();
        result.docNumber = termsEnum.docFreq();
        if (result.valueSum[0] > -1) {
          return result;
        }
      }
      throw new IOException("should not call this");
    }
docs: Compute termvector number basic.
  
  @param termsEnum
  the terms enum
  @param r
  the r
  @return the termvector number basic
  @throws IOException
  Signals that an I/O exception has occurred.