    /*
     *  call-seq:
     *     sort_field.type -> symbol
     *
     *  Return the type of sort. Should be one of; +:auto+, +:integer+, +:float+,
     *  +:string+, +:byte+, +:doc_id+ or +:score+.
     */
    static VALUE
    frb_sf_get_type(VALUE self)
    {
        GET_SF();
        switch (sf->type) {
            case SORT_TYPE_BYTE:    return sym_byte;
            case SORT_TYPE_INTEGER: return sym_integer;
            case SORT_TYPE_FLOAT:   return sym_float;
            case SORT_TYPE_STRING:  return sym_string;
            case SORT_TYPE_AUTO:    return sym_auto;
            case SORT_TYPE_DOC:     return sym_doc_id;
            case SORT_TYPE_SCORE:   return sym_score;
        }
        return Qnil;
    }