Add a RepositorySearchScore table and calculation to the RAC worker
This will be used in a followup PR to order search results instead of the RAC join. Currently, the join with the RAC table in search results in a lookup of ~600K rows, which causes searching to take ~6s. This PR denormalizes the data we need, as well as allowing us to score based on a wider band (6 months vs the current 1 week).
This commit is contained in:
parent
1bfca871ec
commit
df3f47c79a
10 changed files with 243 additions and 50 deletions
|
@ -854,8 +854,13 @@ def populate_database(minimal=False, with_storage=False):
|
|||
|
||||
model.user.create_user_prompt(new_user_4, 'confirm_username')
|
||||
|
||||
while repositoryactioncounter.count_repository_actions():
|
||||
pass
|
||||
while True:
|
||||
to_count = model.repositoryactioncount.find_uncounted_repository()
|
||||
if not to_count:
|
||||
break
|
||||
|
||||
model.repositoryactioncount.count_repository_actions(to_count)
|
||||
model.repositoryactioncount.update_repository_score(to_count)
|
||||
|
||||
|
||||
def find_models_missing_data():
|
||||
|
|
Reference in a new issue