def facet_token(field, v): token = [] v = coerce_str(v) field = coerce_str(field) q = int(mkhash('FT,%s,%s'%(field,v)).hexdigest(), 16) for i in range(facet_token_length): q,r = divmod(q, 26) token.append(string.lowercase[r]) return ''.join(token)
def facet_token(field, v): token = [] v = coerce_str(v) field = coerce_str(field) q = int(mkhash('FT,%s,%s' % (field, v)).hexdigest(), 16) for i in range(facet_token_length): q, r = divmod(q, 26) token.append(string.lowercase[r]) return ''.join(token)