toIndexFieldType method

IndexFieldType toIndexFieldType()

Implementation

IndexFieldType toIndexFieldType() {
  switch (this) {
    case 'int':
      return IndexFieldType.int;
    case 'double':
      return IndexFieldType.double;
    case 'literal':
      return IndexFieldType.literal;
    case 'text':
      return IndexFieldType.text;
    case 'date':
      return IndexFieldType.date;
    case 'latlon':
      return IndexFieldType.latlon;
    case 'int-array':
      return IndexFieldType.intArray;
    case 'double-array':
      return IndexFieldType.doubleArray;
    case 'literal-array':
      return IndexFieldType.literalArray;
    case 'text-array':
      return IndexFieldType.textArray;
    case 'date-array':
      return IndexFieldType.dateArray;
  }
  throw Exception('$this is not known in enum IndexFieldType');
}