code: public synchronized void index(long offset, long term) {
      if (lookup(offset) != term) {
        terms.put(offset, term);
      }
    }
docs: Indexes the given offset with the given term.
  
  @param offset The offset to index.
  @param term The term to index.