'Queries, a list of search queries
Base Queryset, the base queryset in which we are searching'

def find_users(self, queries, base_queryset=None):

    if (base_queryset is None):
        base_queryset = self.all()
    filters = []
    for query in queries:
        match = (Q(name__istartswith=query) | Q(name__icontains=('    %s' % query)))
        filters.append(match)
    users = base_queryset.filter(reduce(operator.and_, filters))
    return users
