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
improved search results #2116
Conversation
added mode for debug info
source/MRViewer/MRRibbonSchema.h
Outdated
float weight{ -1.f }; | ||
float captionWeight{ -1.f }; | ||
float tooltipWeight{ -1.f }; |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
better expand SearchResult struct
There was a problem hiding this comment.
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 ) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 ) |
There was a problem hiding this comment.
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
added mode for debug info