docs: public static void insertTerm(Term[] terms, Term term, InsertTermType type) {
          Term self = terms[term.getOffe()];
  
          if (self == null) {
              terms[term.getOffe()] = term;
              return;
          }
  
          int len = term.getName().length();
  
          // 如果是第一位置
          if (self.getName().length() == len) {
              if (type == InsertTermType.REPLACE) {
                  term.setNext(self.next());
                  terms[term.getOffe()] = term;
              } else if (type == InsertTermType.SCORE_ADD_SORT) {
                  self.score(self.score() + term.score());
                  self.selfScore(self.selfScore() + term.selfScore());
              }
              return;
          }
  
          if (self.getName().length() > len) {
              term.setNext(self);
              terms[term.getOffe()] = term;
              return;
          }
  
          Term next = self;
          Term before = self;
          while ((next = before.next()) != null) {
              if (next.getName().length() == len) {
                  if (type == InsertTermType.REPLACE) {
                      term.setNext(next.next());
                      before.setNext(term);
                  } else if (type == InsertTermType.SCORE_ADD_SORT) {
                      next.score(next.score() + term.score());
                      next.selfScore(next.selfScore() + term.selfScore());
                  }
                  return;
              } else if (next.getName().length() > len) {
                  before.setNext(term);
                  term.setNext(next);
                  return;
              }
              before = next;
          }
  
          before.setNext(term); // 如果都没有命中
      }