Skip to content

Commit b24cd4d

Browse files
committed
Increased stepping.
1 parent 9b15856 commit b24cd4d

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

api/server.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -452,10 +452,12 @@ async def lookup(string: str,
452452
#
453453
# However, this approach causes very large clique_identifier_count entries (like diphenhydramine, cic=1332)
454454
# to be returned when we don't have an otherwise good match. So instead we make it stepwise:
455-
# - If clique_identifier_count > 1, we boost by 2x
456-
"if(gt(clique_identifier_count,1),2,1)",
457-
# - If clique_identifier_count > 5, we boost by a further 2x
458-
"if(gt(clique_identifier_count,5),2,1)",
455+
# - If clique_identifier_count == 1, we reduce the boost by 0.5x
456+
"if(eq(clique_identifier_count, 1), 1, 0.5)",
457+
# - If clique_identifier_count > 10, we boost by a further 2x
458+
"if(gt(clique_identifier_count, 10), 2, 1)",
459+
# - If clique_identifier_count > 20, we boost by a further 2x
460+
"if(gt(clique_identifier_count, 20), 2, 1)",
459461
],
460462
},
461463
},

0 commit comments

Comments
 (0)