From 73eead277ecd6a3f5fd98506ac869e277b14cf99 Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Fri, 18 Nov 2022 08:32:55 -0500 Subject: [PATCH] Update fuzzysearchdatabase and tweak Module Browser search. --- dep/fuzzysearchdatabase | 2 +- src/app/Browser.cpp | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/dep/fuzzysearchdatabase b/dep/fuzzysearchdatabase index fe624798..a3a1bf55 160000 --- a/dep/fuzzysearchdatabase +++ b/dep/fuzzysearchdatabase @@ -1 +1 @@ -Subproject commit fe62479811e503ef3c091f5a859d27bfcf0a44da +Subproject commit a3a1bf557b8e6ee58b55fa82ff77ff7a3d141949 diff --git a/src/app/Browser.cpp b/src/app/Browser.cpp index 529b574f..68856788 100644 --- a/src/app/Browser.cpp +++ b/src/app/Browser.cpp @@ -45,8 +45,8 @@ static fuzzysearch::Database modelDb; static void modelDbInit() { modelDb = fuzzysearch::Database(); - modelDb.setWeights({1.f, 1.f, 0.1f, 1.f, 0.5f, 0.5f}); - modelDb.setThreshold(0.25f); + modelDb.setWeights({1.0f, 1.0f, 1.0f, 0.8f, 1.0f}); + modelDb.setThreshold(0.5f); // Iterate plugins for (plugin::Plugin* plugin : plugin::plugins) { @@ -58,18 +58,17 @@ static void modelDbInit() { // Add all aliases of a tag for (const std::string& tagAlias : tag::tagAliases[tagId]) { tagStr += tagAlias; - tagStr += ", "; + tagStr += " "; } } std::vector fields = { model->plugin->brand, model->plugin->name, - model->plugin->description, model->name, model->description, tagStr, }; - // DEBUG("%s; %s; %s; %s; %s; %s", fields[0].c_str(), fields[1].c_str(), fields[2].c_str(), fields[3].c_str(), fields[4].c_str(), fields[5].c_str()); + // DEBUG("%s; %s; %s; %s; %s; %s", fields[0].c_str(), fields[1].c_str(), fields[2].c_str(), fields[3].c_str(), fields[4].c_str()); modelDb.addEntry(model, fields); } }