mirror of
				https://github.com/searxng/searxng.git
				synced 2025-11-04 03:27:06 -05:00 
			
		
		
		
	[fix] weight configurable via engines.cfg
This commit is contained in:
		
							parent
							
								
									046e190721
								
							
						
					
					
						commit
						39ebe1d519
					
				@ -118,8 +118,6 @@ def score_results(results):
 | 
				
			|||||||
        weight = 1.0
 | 
					        weight = 1.0
 | 
				
			||||||
        if hasattr(engines[res['engine']], 'weight'):
 | 
					        if hasattr(engines[res['engine']], 'weight'):
 | 
				
			||||||
            weight = float(engines[res['engine']].weight)
 | 
					            weight = float(engines[res['engine']].weight)
 | 
				
			||||||
        elif res['engine'] in settings.weights:
 | 
					 | 
				
			||||||
            weight = float(settings.weights[res['engine']])
 | 
					 | 
				
			||||||
        score = int((flat_len - i)/engines_len)*weight+1
 | 
					        score = int((flat_len - i)/engines_len)*weight+1
 | 
				
			||||||
        duplicated = False
 | 
					        duplicated = False
 | 
				
			||||||
        for new_res in results:
 | 
					        for new_res in results:
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user