优化入库单位逻辑,识别阈值设置为0.8

This commit is contained in:
2025-11-04 12:11:51 +08:00
parent 324986fb10
commit 069306d48b
9 changed files with 154 additions and 51 deletions
@@ -88,7 +88,7 @@ object FoodModule {
//查询比较分数
// val tempList = query.findWithScores().sortedBy { it.score }.map { "${it.get().name}|${it.get().foodIdx}|${it.score}" }
val map = mutableMapOf<String, Int>()
query.findIdsWithScores().forEach {
query.findIdsWithScores().filter { it.score < 0.2 }.forEach {
val food = box.get(it.id)
//FoodQueryResult(id = it.id, name = food.name, foodIdx = food.foodIdx, score = it.score)
food.name?.let { key ->