def start_end_query(start, end):
    """Make a catalog query out of start and end dates.
    """
    query = {}
    if start:
        query['end'] = {'query': start, 'range': 'min'}
    if end:
        query['start'] = {'query': end, 'range': 'max'}
    return query
