Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improved search results #2116

Merged
merged 7 commits into from Feb 1, 2024
Merged

improved search results #2116

merged 7 commits into from Feb 1, 2024

Conversation

ABSitf
Copy link
Contributor

@ABSitf ABSitf commented Jan 26, 2024

added mode for debug info

Comment on lines 72 to 74
float weight{ -1.f };
float captionWeight{ -1.f };
float tooltipWeight{ -1.f };
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure we want to store dynamic search information here

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

better expand SearchResult struct

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also should these new field be under DEBUG def?

res.reserve( resultListForSort.size() );
for ( const auto& sortedRes : resultListForSort )
res.push_back( sortedRes.second );
if ( !rawResult.empty() && rawResult[0].second.captionWeight < maxWeight / 3.f )
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add comment for this block

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

};

const float maxWeight = 0.25f;
bool exactMatch = false;
auto checkItem = [&] ( const MenuItemInfo& item, int t )
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add comment for this function

@ABSitf ABSitf merged commit 7af2a5e into master Feb 1, 2024
4 checks passed
@ABSitf ABSitf deleted the i3214_improve_search_results branch February 1, 2024 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants