docs: private static void createTermvectorFull(
        List<ComponentTermVector> termVectorList,
        Map<Integer, Integer> positionsData, List<Integer> docSet, Terms t,
        LeafReader r, LeafReaderContext lrc) throws IOException {
      if (t != null) {
        BytesRef term;
        TermsEnum termsEnum;
        PostingsEnum postingsEnum = null;
        String segmentName = "segment" + lrc.ord;
        int segmentNumber = lrc.parent.leaves().size();
        // loop over termvectors
        for (ComponentTermVector termVector : termVectorList) {
          if (termVector.full || termVector.list != null) {
            if (termVector.full) {
              termVector.subComponentFunction.dataCollector.setWithTotal();
            }
            List<CompiledAutomaton> listAutomata;
            Map<String, Automaton> automatonMap;
            if (termVector.list == null) {
              listAutomata = new ArrayList<>();
              CompiledAutomaton compiledAutomaton;
              Automaton automaton;
              if ((termVector.regexp == null) || (termVector.regexp.isEmpty())) {
                RegExp re = new RegExp(
                    termVector.prefix + MtasToken.DELIMITER + ".*");
                automaton = re.toAutomaton();
              } else {
                RegExp re = new RegExp(termVector.prefix + MtasToken.DELIMITER
                    + termVector.regexp + "\u0000*");
                automaton = re.toAutomaton();
              }
              compiledAutomaton = new CompiledAutomaton(automaton);
              listAutomata.add(compiledAutomaton);
            } else {
              automatonMap = MtasToken.createAutomatonMap(termVector.prefix,
                  new ArrayList<String>(termVector.list),
                  termVector.listRegexp ? false : true);
              listAutomata = MtasToken.createAutomata(termVector.prefix,
                  termVector.regexp, automatonMap);
            }
            List<ByteRunAutomaton> ignoreByteRunAutomatonList = null;
            if ((termVector.ignoreRegexp != null)
                && (!termVector.ignoreRegexp.isEmpty())) {
              ignoreByteRunAutomatonList = new ArrayList<>();
              RegExp re = new RegExp(termVector.prefix + MtasToken.DELIMITER
                  + termVector.ignoreRegexp + "\u0000*");
              ignoreByteRunAutomatonList
                  .add(new ByteRunAutomaton(re.toAutomaton()));
            }
            if (termVector.ignoreList != null) {
              if (ignoreByteRunAutomatonList == null) {
                ignoreByteRunAutomatonList = new ArrayList<>();
              }
              Map<String, Automaton> list = MtasToken.createAutomatonMap(
                  termVector.prefix, new ArrayList<String>(termVector.ignoreList),
                  termVector.ignoreListRegexp ? false : true);
              for (Automaton automaton : list.values()) {
                ignoreByteRunAutomatonList.add(new ByteRunAutomaton(automaton));
              }
            }
            for (CompiledAutomaton compiledAutomaton : listAutomata) {
              if (!compiledAutomaton.type
                  .equals(CompiledAutomaton.AUTOMATON_TYPE.NORMAL)) {
                if (compiledAutomaton.type
                    .equals(CompiledAutomaton.AUTOMATON_TYPE.NONE)) {
                  // do nothing
                } else {
                  throw new IOException(
                      "compiledAutomaton is " + compiledAutomaton.type);
                }
              } else {
                termsEnum = t.intersect(compiledAutomaton, null);
                int initSize = Math.min((int) t.size(), 1000);
                termVector.subComponentFunction.dataCollector.initNewList(
                    initSize, segmentName, segmentNumber, termVector.boundary);
                boolean doBasic = termVector.subComponentFunction.dataCollector
                    .getStatsType().equals(CodecUtil.STATS_BASIC);
                if (termVector.functions != null) {
                  for (SubComponentFunction function : termVector.functions) {
                    function.dataCollector.initNewList(initSize);
                    doBasic = doBasic
                        ? (function.parserFunction.sumRule()
                            && !function.parserFunction.needPositions()
                            && function.dataCollector.getStatsType()
                                .equals(CodecUtil.STATS_BASIC))
                        : doBasic;
                  }
                }
                // only if documents
                if (!docSet.isEmpty()) {
                  int termDocId;
                  boolean acceptedTerm;
                  String key;
                  // loop over terms
                  while ((term = termsEnum.next()) != null) {
                    if (validateTermWithStartValue(term, termVector)
                        && validateTermWithDistance(term, termVector)) {
                      termDocId = -1;
                      acceptedTerm = true;
                      if (ignoreByteRunAutomatonList != null) {
                        for (ByteRunAutomaton ignoreByteRunAutomaton : ignoreByteRunAutomatonList) {
                          if (ignoreByteRunAutomaton.run(term.bytes, term.offset,
                              term.length)) {
                            acceptedTerm = false;
                            break;
                          }
                        }
                      }
                      if (acceptedTerm) {
                        if (doBasic) {
                          // compute numbers;
                          TermvectorNumberBasic numberBasic = computeTermvectorNumberBasic(
                              docSet, termDocId, termsEnum, r, lrc, postingsEnum);
                          // register
                          if (numberBasic.docNumber > 0) {
                            long valueLong = 0;
                            key = MtasToken.getPostfixFromValue(term);
                            try {
                              valueLong = termVector.subComponentFunction.parserFunction
                                  .getValueLong(numberBasic.valueSum, 1);
                            } catch (IOException e) {
                              log.debug(e);
                              termVector.subComponentFunction.dataCollector.error(
                                  MtasToken.getPostfixFromValue(term),
                                  e.getMessage());
                            }
                            termVector.subComponentFunction.dataCollector.add(key,
                                valueLong, numberBasic.docNumber);
                            if (termVector.functions != null) {
                              for (SubComponentFunction function : termVector.functions) {
                                if (function.dataType
                                    .equals(CodecUtil.DATA_TYPE_LONG)) {
                                  long valueFunction = function.parserFunction
                                      .getValueLong(numberBasic.valueSum, 0);
                                  function.dataCollector.add(key, valueFunction,
                                      numberBasic.docNumber);
                                } else if (function.dataType
                                    .equals(CodecUtil.DATA_TYPE_DOUBLE)) {
                                  double valueFunction = function.parserFunction
                                      .getValueDouble(numberBasic.valueSum, 0);
                                  function.dataCollector.add(key, valueFunction,
                                      numberBasic.docNumber);
                                }
                              }
                            }
                          }
                        } else {
                          TermvectorNumberFull numberFull = computeTermvectorNumberFull(
                              docSet, termDocId, termsEnum, lrc, postingsEnum,
                              positionsData);
                          if (numberFull.docNumber > 0) {
                            long[] valuesLong = new long[numberFull.docNumber];
                            key = MtasToken.getPostfixFromValue(term);
                            for (int i = 0; i < numberFull.docNumber; i++) {
                              try {
                                valuesLong[i] = termVector.subComponentFunction.parserFunction
                                    .getValueLong(
                                        new long[] { numberFull.args[i] },
                                        numberFull.positions[i]);
                              } catch (IOException e) {
                                log.debug(e);
                                termVector.subComponentFunction.dataCollector
                                    .error(key, e.getMessage());
                              }
                            }
                            termVector.subComponentFunction.dataCollector.add(key,
                                valuesLong, valuesLong.length);
                            if (termVector.functions != null) {
                              for (SubComponentFunction function : termVector.functions) {
                                if (function.dataType
                                    .equals(CodecUtil.DATA_TYPE_LONG)) {
                                  valuesLong = new long[numberFull.docNumber];
                                  for (int i = 0; i < numberFull.docNumber; i++) {
                                    try {
                                      valuesLong[i] = function.parserFunction
                                          .getValueLong(
                                              new long[] { numberFull.args[i] },
                                              numberFull.positions[i]);
                                    } catch (IOException e) {
                                      log.debug(e);
                                      function.dataCollector.error(key,
                                          e.getMessage());
                                    }
                                  }
                                  function.dataCollector.add(key, valuesLong,
                                      valuesLong.length);
                                } else if (function.dataType
                                    .equals(CodecUtil.DATA_TYPE_DOUBLE)) {
                                  double[] valuesDouble = new double[numberFull.docNumber];
                                  for (int i = 0; i < numberFull.docNumber; i++) {
                                    try {
                                      valuesDouble[i] = function.parserFunction
                                          .getValueDouble(
                                              new long[] { numberFull.args[i] },
                                              numberFull.positions[i]);
                                    } catch (IOException e) {
                                      log.debug(e);
                                      function.dataCollector.error(key,
                                          e.getMessage());
                                    }
                                  }
                                  function.dataCollector.add(key, valuesDouble,
                                      valuesDouble.length);
                                }
                              }
                            }
                          }
  
                        }
                      }
                    }
                  }
                }
                termVector.subComponentFunction.dataCollector.closeNewList();
                if (termVector.functions != null) {
                  for (SubComponentFunction function : termVector.functions) {
                    function.dataCollector.closeNewList();
                  }
                }
              }
            }
          }
        }
      }
    }