cakiki commited on
Commit
10d12af
1 Parent(s): 808f2e9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -56,10 +56,9 @@ def phrase_query(query, num_results=10):
56
  return response
57
 
58
  def search(query, num_results=10):
 
59
  if query.startswith('"') and query.endswith('"'):
60
- print("HERE")
61
  response = phrase_query(query[1:-1], num_results=num_results)
62
- print(len(response))
63
  else:
64
  response = match_query(query, num_results=num_results)
65
  results = [{"text": hit.content, "repository": f"{hit.repository}/{hit.path}", "license": hit.license[0], "language": hit.language} for hit in response]
 
56
  return response
57
 
58
  def search(query, num_results=10):
59
+ print(es.ping())
60
  if query.startswith('"') and query.endswith('"'):
 
61
  response = phrase_query(query[1:-1], num_results=num_results)
 
62
  else:
63
  response = match_query(query, num_results=num_results)
64
  results = [{"text": hit.content, "repository": f"{hit.repository}/{hit.path}", "license": hit.license[0], "language": hit.language} for hit in response]