INNER CODE UNIT · Python
search
neuml/tldrstory · src/python/tldrstory/app.py:242
def search(self, query, topic, filters):
"""
Executes a search.
Args:
query: query to run
topic: flag that signals query is a pre-defined topic (1) or ad hoc query (0 or None)
filters: additional filters to apply
Returns:
query results
"""
# Run query against API
results = self.query(query, topic, filters)
# Dataframe columns
columns = ["Date", "Title", "Reference"] + [name for name, _ in filters]