code: func (t *Transaction) saveFieldIndexesForFields(fieldNames []string, mr *modelRef) {
  	for _, fs := range mr.spec.fields {
  		// Skip fields whose names do not appear in fieldNames.
  		if !stringSliceContains(fieldNames, fs.name) {
  			continue
  		}
  		switch fs.indexKind {
  		case noIndex:
  			continue
  		case numericIndex:
  			t.saveNumericIndex(mr, fs)
  		case booleanIndex:
  			t.saveBooleanIndex(mr, fs)
  		case stringIndex:
  			t.saveStringIndex(mr, fs)
  		}
  	}
  }
docs: // saveFieldIndexesForFields works like saveFieldIndexes, but only saves the
  // indexes for the given fieldNames.