Ce serveur Gitlab sera éteint le 30 juin 2020, pensez à migrer vos projets vers les serveurs gitlab-research.centralesupelec.fr et gitlab-student.centralesupelec.fr !

Commit 319fa131 authored by Dos Santos David's avatar Dos Santos David

refactor run query

parent ee070a38
from gogole import query
def run(collection, args):
q = " ".join(args.query)
query_cls = query.QUERY_MAP[args.search_query_type]
query_browser = query_cls(collection)
print("searching {query} using {model} model".format(
......@@ -19,11 +19,11 @@ class BooleanQuery(Query):
return set.intersection(*doc_ids_by_conjunction)
def search(self, query_lst):
def search(self, query):
Parse a boolean query
and return a list of documents relevant for this query
doc_ids = self.search_documents(" ".join(x.lower() for x in query_lst))
doc_ids = self.search_documents(query)
print("Document ids : {}".format(", ".join(str(x) for x in doc_ids)))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment