-
Notifications
You must be signed in to change notification settings - Fork 635
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
QNTM-5869: Search keywords split mechanism #9271
Changes from 8 commits
592d004
8957593
f31c89c
ad954ff
872ae52
6ea8014
35a8d60
3d78511
e40a85b
302889c
9d0719a
815e694
7405eb9
1b2ae4a
8aacc9e
ce19e59
83a11a9
bba5180
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,7 +45,7 @@ | |
// to distinguish one build from another. AssemblyFileVersion is specified | ||
// in AssemblyVersionInfo.cs so that it can be easily incremented by the | ||
// automated build process. | ||
[assembly: AssemblyVersion("2.1.0.4395")] | ||
[assembly: AssemblyVersion("2.1.0.6957")] | ||
|
||
|
||
// By default, the "Product version" shown in the file properties window is | ||
|
@@ -64,4 +64,4 @@ | |
// You can specify all the values or you can default the Build and Revision Numbers | ||
// by using the '*' as shown below: | ||
// [assembly: AssemblyVersion("1.0.*")] | ||
[assembly: AssemblyFileVersion("2.1.0.4395")] | ||
[assembly: AssemblyFileVersion("2.1.0.6957")] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think that this file is usually included in PRs. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,8 @@ public class SearchDictionary<V> | |
protected readonly Dictionary<V, Dictionary<string, double>> entryDictionary = | ||
new Dictionary<V, Dictionary<string, double>>(); | ||
|
||
public bool experimentalSearch = false; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can this be made private? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think I can make it private here because I need to be able to access it from the DynamoViewModel. Maybe I'm missing something? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. one option because this is an internal API is mark this internal and use [internalsVisibleAttribute] to make this property accessible from DynamoCoreWPF assembly. |
||
|
||
/// <summary> | ||
/// All the current entries in search. | ||
/// </summary> | ||
|
@@ -310,6 +312,16 @@ internal IEnumerable<V> Search(string query, int minResultsForTolerantSearch = 0 | |
query = query.ToLower(); | ||
|
||
var subPatterns = SplitOnWhiteSpace(query); | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just as a question; should this code be wrapped in #if DEBUG statements? Probably not necessary, but I am doing the same type of code and wanted to get the group thought about if it is needed/wanted or not. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think because this code is already in the debug only menu it's fine not to use a compiler flag. On the other hand, for performance impacting code - like |
||
// Experimental Search | ||
if (experimentalSearch) | ||
{ | ||
var subPatternsList = subPatterns.ToList(); | ||
subPatternsList.Add(query); | ||
subPatterns = (subPatternsList).ToArray(); | ||
subPatterns = new string[] { "test" }; | ||
} | ||
|
||
foreach (var pair in tagDictionary.Where(x => MatchWithQueryString(x.Key, subPatterns))) | ||
{ | ||
ComputeWeightAndAddToDictionary(query, pair, searchDict); | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -881,7 +881,7 @@ It does not contain your graph or any personal data</value> | |
<comment>Settings menu | Geometry Scaling</comment> | ||
</data> | ||
<data name="DynamoViewSettingsMenuIsolationMode" xml:space="preserve"> | ||
<value>Isolate Selected Geometries</value> | ||
<value>Isolate Selected Geometry</value> | ||
</data> | ||
<data name="DynamoViewSettingsMenuShowEdges" xml:space="preserve"> | ||
<value>Show Edges</value> | ||
|
@@ -1619,10 +1619,10 @@ Next assemblies were loaded several times: | |
<value>Package Path Added</value> | ||
</data> | ||
<data name="PackagePathAutoAddNotificationShortDescription" xml:space="preserve"> | ||
<value>A library (*.dll, *.ds) was recently imported into Dynamo. Its path was automatically added to "Settings > Manage Node and Package Paths..."</value> | ||
<value>A library (*.dll, *.ds) was recently imported into Dynamo. Its path was automatically added to "Settings > Manage Node and Package Paths..."</value> | ||
</data> | ||
<data name="PackagePathAutoAddNotificationDetailedDescription" xml:space="preserve"> | ||
<value>The import path "{0}" was added to "Manage Node and Package Paths". If you want to update or remove this path, please open "Settings > Manage Node and Package Paths..."</value> | ||
<value>The import path "{0}" was added to "Manage Node and Package Paths". If you want to update or remove this path, please open "Settings > Manage Node and Package Paths..."</value> | ||
</data> | ||
<data name="PackageSearchStateNoResult" xml:space="preserve"> | ||
<value>Search returned no results!</value> | ||
|
@@ -1855,9 +1855,6 @@ Want to publish a different package?</value> | |
<data name="PublishPackageViewPackageVersion" xml:space="preserve"> | ||
<value>Version (major minor build)</value> | ||
</data> | ||
<data name="DynamoViewSettingsMenuIsolationMode" xml:space="preserve"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure where these resource changes are coming from |
||
<value>Isolate Selected Geometry</value> | ||
</data> | ||
<data name="PublishPackageViewPackageVersionTooltip" xml:space="preserve"> | ||
<value>A version name helps a submitter keep track of updates to the package. A new version of a package will be REJECTED if this is not incremeneted.</value> | ||
</data> | ||
|
@@ -2199,4 +2196,8 @@ Do you want to install the latest Dynamo update?</value> | |
<data name="RerunButtonToolTip" xml:space="preserve"> | ||
<value>Rerun the graph.</value> | ||
</data> | ||
<data name="DynamoViewDebugMenuExperimentalSearch" xml:space="preserve"> | ||
<value>Experimental Search</value> | ||
<comment>Debug menu | Experimental Search</comment> | ||
</data> | ||
</root> |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -291,6 +291,15 @@ public bool EnableTSpline | |
} | ||
} | ||
|
||
public bool ExperimentalSearch | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should have a summary /// tag if this a public API - does it need to be public? |
||
{ | ||
get { return model.SearchModel.experimentalSearch; } | ||
set | ||
{ | ||
model.SearchModel.experimentalSearch = value; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess in this case it's not such a big deal, but you usually would not modify a field from another object - I think instead we usually use a property, in this case I think it makes sense to try and hide this field from external consumers - we don't want anyone to use it - in an extension for example. |
||
} | ||
} | ||
|
||
public int LibraryWidth | ||
{ | ||
get | ||
|
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.
you should usually not commit this file.
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.
Whoops, reverting this