code: private static TermvectorNumberFull computeTermvectorNumberFull(
        List<Integer> docSet, int termDocId, TermsEnum termsEnum,
        LeafReaderContext lrc, PostingsEnum postingsEnum,
        Map<Integer, Integer> positionsData) throws IOException {
      TermvectorNumberFull result = new TermvectorNumberFull(docSet.size());
      Iterator<Integer> docIterator = docSet.iterator();
      int localTermDocId = termDocId;
      postingsEnum = termsEnum.postings(postingsEnum, PostingsEnum.FREQS);
      while (docIterator.hasNext()) {
        int docId = docIterator.next() - lrc.docBase;
        if (docId >= localTermDocId && ((docId == localTermDocId)
            || ((localTermDocId = postingsEnum.advance(docId)) == docId))) {
          result.args[result.docNumber] = postingsEnum.freq();
          result.positions[result.docNumber] = (positionsData == null) ? 0
              : positionsData.get(docId + lrc.docBase);
          result.docNumber++;
        }
      }
      return result;
    }
docs: Compute termvector number full.
  
  @param docSet
  the doc set
  @param termDocId
  the term doc id
  @param termsEnum
  the terms enum
  @param lrc
  the lrc
  @param postingsEnum
  the postings enum
  @param positionsData
  the positions data
  @return the termvector number full
  @throws IOException
  Signals that an I/O exception has occurred.