Beispiel #1
0
 def filter(cls, *args, **kwargs):
     type_name = cls.__get_elastic_type_name__()
     from elasticosm.models.queryset import Query, QuerySet
     query = Query.from_query_args(kwargs)
     query.elastic_type = type_name
     qs = QuerySet(query=query)
     return qs
Beispiel #2
0
    def get(type_name, query_args):

        from elasticosm.models.queryset import Query, QuerySet
        query = Query.from_query_args(query_args)
        if type_name is not None:
            query.elastic_type = type_name

        return QuerySet(query=query)
Beispiel #3
0
 def search(cls, search_term, **kwargs):
     type_name = cls.__get_elastic_type_name__()
     from elasticosm.models.queryset import Query, QuerySet
     query_args = kwargs
     query_args['search_term'] = search_term
     query = Query.from_query_args(query_args)
     query.elastic_type = type_name
     qs = QuerySet(query=query)
     return qs