code: public void indexRow(ByteBuffer key, ColumnFamily cf, OpOrder.Group opGroup)
      {
          // Update entire row only once per row level index
          Set<Class<? extends SecondaryIndex>> appliedRowLevelIndexes = null;
  
          for (SecondaryIndex index : allIndexes)
          {
              if (index instanceof PerRowSecondaryIndex)
              {
                  if (appliedRowLevelIndexes == null)
                      appliedRowLevelIndexes = new HashSet<>();
  
                  if (appliedRowLevelIndexes.add(index.getClass()))
                      ((PerRowSecondaryIndex)index).index(key, cf);
              }
              else
              {
                  for (Cell cell : cf)
                      if (cell.isLive() && index.indexes(cell.name()))
                          ((PerColumnSecondaryIndex) index).insert(key, cell, opGroup);
              }
          }
      }
docs: When building an index against existing data, add the given row to the index
  
  @param key the row key
  @param cf the current rows data