Query 2 Get News Articles by Location on a particular date
suggest changedef 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_idsYou can use this query to find all news articles (n) connected to a location (l) by a relationship.
  Found a mistake? Have a question or improvement idea?
  Let me know.
      
      Table Of Contents