查詢 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)