DYN-6094 Lucene unit testing#14214
Conversation
RobertGlobant20
left a comment
There was a problem hiding this comment.
LGTM with some comments
| //} | ||
|
|
||
| var ele = AddNodeTypeToSearch(cbnData); | ||
| var ele = AddNodeTypeToSearch(outputData); |
There was a problem hiding this comment.
just consider (for future bug fixes) that uncommenting this will probably generate duplicates in output and input nodes when searching in the Library (due that are already added in library).
There was a problem hiding this comment.
Thanks @RobertGlobant20. Will test this out.
RobertGlobant20
left a comment
There was a problem hiding this comment.
LGTM with one comment
src/DynamoCoreWpf/ViewModels/Search/NodeAutoCompleteSearchViewModel.cs
Outdated
Show resolved
Hide resolved
|
@QilongTang updated to latest master now. did not have to change any search results for now. |
|
hi @reddyashish Let us know when this is ready for one more review |
|
|
||
|
|
||
| // Create an analyzer to process the text | ||
| Analyzer = CreateAnalyzerByLanguage(dynamoModel.PreferenceSettings.Locale); |
There was a problem hiding this comment.
Added back the lucene search support for different languages.
There was a problem hiding this comment.
@reddyashish you miss to comment/remove the line 86 otherwise we will be using always the StandardAnalyzer.

| if (useLucene) | ||
| { | ||
| //The DirectoryReader and IndexSearcher have to be assigned after commiting indexing changes and before executing the Searcher.Search() method, otherwise new indexed info won't be reflected | ||
| LuceneSearchUtility.dirReader = LuceneSearchUtility.writer?.GetReader(applyAllDeletes: true); |
There was a problem hiding this comment.
All the search code is moved to the NodeSearchModel class.
|
@QilongTang This is now ready for final review
|
|
@reddyashish Did you run self serve on this branch or confirm the testing state? If yes, good to merge |
|
Yes, I ran the self-serve and only 5 docbrowser tests are failing. |
|
Merging this and will cherrypick into 2.19 |
* Lucene unit testing * test updates * Update LuceneSearchUtility.cs * Update NodeAutoCompleteSearchViewModel.cs * Update NodeAutoCompleteSearchViewModel.cs * Test updates (cherry picked from commit 780f854)
* DYN-6094 Lucene unit testing (#14214) * Lucene unit testing * test updates * Update LuceneSearchUtility.cs * Update NodeAutoCompleteSearchViewModel.cs * Update NodeAutoCompleteSearchViewModel.cs * Test updates (cherry picked from commit 780f854) * Update SearchResultDataProvider.cs (#14253) Co-authored-by: pinzart <[email protected]> (cherry picked from commit aaf6a4e) --------- Co-authored-by: pinzart90 <[email protected]>


Purpose
This PR is to use Lucene search in the Dynamo unit tests.
Declarations
Check these if you believe they are true
*.resxfilesRelease Notes
DYN-6094 Lucene unit testing
Reviewers
@QilongTang @RobertGlobant20
FYIs
@DynamoDS/dynamo