def getSolrType(self, field):
        """Returns the SOLR type of the specified field name.

        Assumes the convention of dynamic fields using an underscore + type character
        code for the field name.

        """
        ftype = 'string'
        try:
            ftype = self.fieldtypes[field]
            return ftype
        except Exception:
            pass
        fta = field.split('_')
        if len(fta) > 1:
            ft = fta[len(fta) - 1]
            try:
                ftype = self.fieldtypes[ft]
                # cache the type so it's used next time
                self.fieldtypes[field] = ftype
            except Exception:
                pass
        return ftype
def getSolrType ( self , field ) : ftype = 'string' try : ftype = self . fieldtypes [ field ] return ftype except Exception : pass fta = field . split ( '_' ) if len ( fta ) > 1 : ft = fta [ len ( fta ) - 1 ] try : ftype = self . fieldtypes [ ft ] self . fieldtypes [ field ] = ftype except Exception : pass return ftype
Returns the SOLR type of the specified field name.

        Assumes the convention of dynamic fields using an underscore + type character
        code for the field name.