QNTM-5870: When searching weights should be taken into account before string matching #9312
QNTM-5870: When searching weights should be taken into account before string matching #9312ColinDayOrg merged 17 commits intoDynamoDS:masterfrom
Conversation
… mode after running CI)
|
Note: After running CI and EngOps tests without the debug mode (so there were only 20 results being returned) all tests passed successfully. |
| .Select(x => x.Key); | ||
| var orderedSearchDict = searchDict.OrderByDescending(x => x.Value); | ||
| #if DEBUG | ||
| //if (this.logger != null) |
There was a problem hiding this comment.
@ColinDayOrg did you mean to leave this commented out?
There was a problem hiding this comment.
Yes. Normally I would delete code like this, but it seemed that it could possibly be useful in the future. It can be removed if that would be preferable. It can output a lot of logging data and may not need to be used a lot which is why I commented it out.
There was a problem hiding this comment.
If these are debug mode only code, I prefer to leave them not commented and once we flip the debug mode, we can remove then.
There was a problem hiding this comment.
Due to this code possibly outputting a large amount of logging data if it were uncommented, and it not needing to be used currently, I have removed this code. It can always be put back if needed.
| public class NodeSearchModel : SearchLibrary<NodeSearchElement, NodeModel> | ||
| { | ||
| internal NodeSearchModel(ILogger logger = null) : base(logger) | ||
| { |
There was a problem hiding this comment.
even though these are internal - what do you think about adding some comments on why these constructors were added?
|
@ColinDayOrg this looks good - thanks for comments. |
Please Note:
DynamoRevitrepo will need to be cherry-picked into all the DynamoRevit Release branches that Dynamo supports. Contributors will be responsible for cherry-picking their reviewed commits to the other branches after aLGTMlabel is added to the PR.Purpose
This PR returns the top 20 search results instead of all search results (which can be arbitrarily large, especially after only typing one letter into the search bar). It also adds some logging to output the time taken to search to the console when running a debug build. This logging was not put behind a debug mode as it is only one line of output in a large amount of logging that occurs when searching.
Declarations
Check these if you believe they are true
*.resxfilesReviewers
@mjkkirschner
FYIs
@scottmitchell