func decodeFieldType(typ byte, name string, value []byte) document.Field { switch typ { case 't': return document.NewTextField(name, []uint64{}, value) case 'n': return document.NewNumericFieldFromBytes(name, []uint64{}, value) case 'd': return document.NewDateTimeFieldFromBytes(name, []uint64{}, value) } return nil }
func (r *firestormReader) decodeFieldType(name string, pos []uint64, value []byte) document.Field { switch value[0] { case 't': return document.NewTextField(name, pos, value[1:]) case 'n': return document.NewNumericFieldFromBytes(name, pos, value[1:]) case 'd': return document.NewDateTimeFieldFromBytes(name, pos, value[1:]) } return nil }