Skip to content

Commit

Permalink
fix search debug log
Browse files Browse the repository at this point in the history
  • Loading branch information
JoinTyang committed Sep 9, 2024
1 parent 6597917 commit 0722a44
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions seasearch/index_store/repo_file_name_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,6 @@ def search_files(self, repos, keyword, start=0, size=10, suffixes=None, search_p
bulk_search_params.append(index_info)
bulk_search_params.append(data)

logger.debug('search in repo_filename_index params: %s', json.dumps(bulk_search_params))

results = self.seasearch_api.m_search(bulk_search_params)
files = []

Expand All @@ -177,6 +175,7 @@ def search_files(self, repos, keyword, start=0, size=10, suffixes=None, search_p
}
files.append(r)
files = sorted(files, key=lambda row: row['score'], reverse=True)[:size]
logger.debug('search keyword: %s, search path: %s, in repos: %s , \nsearch result: %s', keyword, search_path, repos, files)

return files

Expand Down

0 comments on commit 0722a44

Please sign in to comment.