Ejemplo n.º 1
0
def query2docidsdate(query, date_begin, date_end):
    """Get the document ids plus their date for the query and date range.
    """
    # this is called multiple times by the timeline
    if settings.DEBUG:
        print >> stderr, "query2docidsdate()"

    date_range = {"lower": date_begin, "upper": date_end}

    return get_document_ids(settings.ES_INDEX, settings.ES_DOCTYPE, query.query, date_range)
Ejemplo n.º 2
0
def query2docidsdate(query, date_begin, date_end):
    """Get the document ids plus their date for the query and date range.
    """
    # this is called multiple times by the timeline
    if settings.DEBUG:
        print >> stderr, "query2docidsdate()"

    date_range = {'lower': date_begin, 'upper': date_end}

    return get_document_ids(settings.ES_INDEX, settings.ES_DOCTYPE,
                            query.query, date_range)
Ejemplo n.º 3
0
def query2docidsdate(query, resolution):
    """
    Get the document ids plus their date for the query.
    """
    if settings.DEBUG:
        print >> stderr, "query2docidsdate()"

    query_dict = query.get_query_dict()

    return get_document_ids(settings.ES_INDEX, settings.ES_DOCTYPE,
                            query_dict['query'], query_dict['dates'],
                            resolution, query_dict['exclude_distributions'],
                            query_dict['exclude_article_types'],
                            query_dict['selected_pillars'])
Ejemplo n.º 4
0
def query2docidsdate(query, resolution):
    """
    Get the document ids plus their date for the query.
    """
    if settings.DEBUG:
        print >> stderr, "query2docidsdate()"

    query_dict = query.get_query_dict()

    return get_document_ids(settings.ES_INDEX,
                            settings.ES_DOCTYPE,
                            query_dict['query'],
                            query_dict['dates'],
                            resolution,
                            query_dict['exclude_distributions'],
                            query_dict['exclude_article_types'],
                            query_dict['selected_pillars'])