查询 2 在特定日期按位置获取新闻文章

def search_news_by_entity(location,timestamp):
    query = """
    MATCH (n)-[]->(l) 
    where l.name='%s' and n.timestamp='%s'
    RETURN n.news_id limit 10
    """

    query = query % (location,timestamp)

    news_ids = []
    for res in graph.cypher.execute(query):
        news_ids.append(str(res[0]))

    return news_ids

你可以使用此查询查找通过关系连接到位置 (l) 的所有新闻文章 (n)