def get_query_string(**kwargs):
    """
    Concatenates the non-None keyword arguments to create a query string for ElasticSearch.

    :return: concatenated query string or None if not arguments were given
    """
    q = ['%s:%s' % (key, value) for key, value in kwargs.items() if value not in (None, '')]
    return ' AND '.join(q) or None