public void index(Iterator tuples,String field){
  while (tuples.hasNext()) {
    Tuple t=(Tuple)tuples.next();
    index(t,field);
  }
}

public void index ( Iterator tuples , String field ) { while ( tuples . hasNext ( ) ) { Tuple t = ( Tuple ) tuples . next ( ) ; index ( t , field ) ; } }
indexes the data values for the given field name for each tuple in the provided iterator . these values are used to construct an internal data structure allowing fast searches over these attributes . to index multiple fields , simply call this method multiple times with the desired field names .
