'Returns Available facets for the document'

def get_available_facets(self):

    result = []
    for (k, v) in list(self.properties.items()):
        if isinstance(v, DateField):
            if (not v.tokenize):
                result.append((k, 'date'))
        elif isinstance(v, NumericFieldAbstract):
            result.append((k, 'numeric'))
        elif isinstance(v, StringField):
            if (not v.tokenize):
                result.append((k, 'term'))
        elif isinstance(v, GeoPointField):
            if (not v.tokenize):
                result.append((k, 'geo'))
        elif isinstance(v, ObjectField):
            for (n, t) in self.get_available_facets():
                result.append((((self.name + '.') + k), t))
    return result
