Fixing complex->float number problem maybe

This commit is contained in:
Hydrus Network Developer 2023-01-25 17:15:46 -06:00
parent c51b859901
commit 702900df96
No known key found for this signature in database
GPG Key ID: 76249F053212133C
1 changed files with 3 additions and 3 deletions

View File

@ -5237,7 +5237,7 @@ class DB( HydrusDB.HydrusDB ):
with self._MakeTemporaryIntegerTable( search_tag_ids_to_search_tags.keys(), 'tag_id' ) as temp_tag_id_table_name:
search_tag_ids_to_total_counts = collections.Counter( { tag_id : current_count + pending_count for ( tag_id, current_count, pending_count ) in self.modules_mappings_counts.GetCountsForTags( tag_display_type, file_service_id, tag_service_id, temp_tag_id_table_name ) } )
search_tag_ids_to_total_counts = collections.Counter( { tag_id : abs( current_count ) + abs( pending_count ) for ( tag_id, current_count, pending_count ) in self.modules_mappings_counts.GetCountsForTags( tag_display_type, file_service_id, tag_service_id, temp_tag_id_table_name ) } )
#
@ -5338,7 +5338,7 @@ class DB( HydrusDB.HydrusDB ):
with self._MakeTemporaryIntegerTable( all_tag_ids, 'tag_id' ) as temp_tag_id_table_name:
tag_ids_to_total_counts = { tag_id : current_count + pending_count for ( tag_id, current_count, pending_count ) in self.modules_mappings_counts.GetCountsForTags( tag_display_type, file_service_id, tag_service_id, temp_tag_id_table_name ) }
tag_ids_to_total_counts = { tag_id : abs( current_count ) + abs( pending_count ) for ( tag_id, current_count, pending_count ) in self.modules_mappings_counts.GetCountsForTags( tag_display_type, file_service_id, tag_service_id, temp_tag_id_table_name ) }
tag_ids_to_total_counts.update( search_tag_ids_to_total_counts )
@ -5370,7 +5370,7 @@ class DB( HydrusDB.HydrusDB ):
suggestion_tag_count = tag_ids_to_total_counts[ tag_id ]
score = matching_count / ( ( suggestion_tag_count * search_tag_count ) ** 0.5 )
score = matching_count / ( ( abs( suggestion_tag_count ) * abs( search_tag_count ) ) ** 0.5 )
# sophisticated hydev score-tuning
if search_tag_is_unnamespaced: