Remove print statements

Remove print statements per Eric's comment since they are not needed
stevens_api
Rachel Kim 2020-05-07 22:11:06 -04:00 committed by GitHub
parent 4c11e5d6dc
commit cc4c4e1a24
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 7 deletions

View File

@ -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()
elastic = Elastic()