From cc4c4e1a240de7f2694e3719cd5fb3b4a80bcddb Mon Sep 17 00:00:00 2001 From: Rachel Kim <32397590+RSK9903@users.noreply.github.com> Date: Thu, 7 May 2020 22:11:06 -0400 Subject: [PATCH] Remove print statements Remove print statements per Eric's comment since they are not needed --- api/elastic.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/api/elastic.py b/api/elastic.py index d062786..c0888af 100644 --- a/api/elastic.py +++ b/api/elastic.py @@ -31,7 +31,6 @@ class Elastic(): def query_fulltext(self, queryText, page=0, perPage=10): startPos, endPos = Elastic.getFromSize(page, perPage) - print(startPos, endPos) search = self.create_search('cce,ccr') renewalSearch = search.query('query_string', query=queryText)[startPos:endPos] return renewalSearch.execute() @@ -39,25 +38,20 @@ class Elastic(): #New Query Types def query_title(self, queryText,page=0, perPage=10): startPos, endPos = Elastic.getFromSize(page, perPage) - print(startPos, endPos) search = self.create_search('cce,ccr') titleSearch = search.query('match', title=queryText)[startPos:endPos] - print(titleSearch.to_dict()) return titleSearch.execute() def query_author(self, queryText,page=0, perPage=10): startPos, endPos = Elastic.getFromSize(page, perPage) - print(startPos, endPos) search = self.create_search('cce,ccr') titleSearch = search.query('match', authors=queryText)[startPos:endPos] - print(titleSearch.to_dict()) return titleSearch.execute() # If query is given for publisher field, don't check renewals? def query_multifields(self, params, page=0, perPage=10): startPos, endPos = Elastic.getFromSize(page, perPage) - print(startPos, endPos) if "publishers" in params: search = self.create_search('cce') search = search.query('match', publishers=params["publishers"]) @@ -77,4 +71,4 @@ class Elastic(): endPos = startPos + perPage return startPos, endPos -elastic = Elastic() \ No newline at end of file +elastic = Elastic()