code: public <V> int removeByField(IndexDefinition<T, V> indexDefinition, V value) {
      Set<T> toRemove = getByField(indexDefinition, value);
  
      int removed = 0;
      for (T o : toRemove) {
        if (remove(o)) {
          removed++;
        }
      }
      return removed;
    }
docs: Removes the subset of objects with the specified index field value.
  
  @param indexDefinition the field index
  @param value the field value
  @param <V> the field type
  @return the number of objects removed