1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-10-19 01:41:26 +00:00

improve search

This commit is contained in:
lins05
2013-03-15 13:59:27 +08:00
parent 4f47828d64
commit cc1193148f

View File

@@ -840,13 +840,13 @@ if getattr(settings, 'ENABLE_FILE_SEARCH', False):
repo.name = repo.repo_name
pubrepo_id_map[repo.id] = repo
# get a list of pure non-pub repos
# remove duplicates from non-pub repos
nonpub_repo_list = []
for repo in owned_repos + shared_repos + groups_repos:
if repo.id not in pubrepo_id_map:
if repo.id not in nonpub_repo_list:
nonpub_repo_list.append(repo)
nonpub_repo_ids = [ repo.id for repo in nonpub_repo_list]
nonpub_repo_ids = [ repo.id for repo in nonpub_repo_list ]
files_found, total = es_search(conn, nonpub_repo_ids, keyword, start, size)