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

DYN-6148 Dynamo Library Lucene Search #14287

Merged
merged 5 commits into from
Aug 24, 2023
Merged

DYN-6148 Dynamo Library Lucene Search #14287

merged 5 commits into from
Aug 24, 2023

Conversation

RobertGlobant20
Copy link
Contributor

Purpose

Switching from using the legacy search to the use of Lucene Search in the Dynamo Library

Declarations

Check these if you believe they are true

  • The codebase is in a better state after this PR
  • Is documented according to the standards
  • The level of testing this PR includes is appropriate
  • User facing strings, if any, are extracted into *.resx files
  • All tests pass using the self-service CI.
  • Snapshot of UI changes, if any.
  • Changes to the API follow Semantic Versioning and are documented in the API Changes document.
  • This PR modifies some build requirements and the readme is updated
  • This PR contains no files larger than 50 MB

Release Notes

Switching from using the legacy search to the use of Lucene Search in the Dynamo Library

Reviewers

@QilongTang @reddyashish

FYIs

Implementing the use of Lucene Search in the Dynamo Library
@RobertGlobant20
Copy link
Contributor Author

This is a GIF showing a comparison between Library Search and InCanvas Search.

DynamoLibraryLuceneSearch

@@ -50,10 +52,11 @@ public NodeItemDataProvider(NodeSearchModel model) : base(false)
this.model = model;
}

public NodeItemDataProvider(NodeSearchModel model, IconResourceProvider iconProvider)
public NodeItemDataProvider(NodeSearchModel model, IconResourceProvider iconProvider, DynamoModel dynModel)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Please let me know if this will produce an API Breaking Change since the method is public but we need to have the DynamoModel in order to pass the dynamoModel.LuceneSearchUtility to the Search method.

Copy link
Contributor

Choose a reason for hiding this comment

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

I have concern over this and would like to discuss with @reddyashish and you on Monday

Copy link
Contributor

Choose a reason for hiding this comment

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

@mjkkirschner This is the place I mentioned in the meeting that I feel Singleton pattern could be good that we do not want to pass DynamoModel around for access to search

@QilongTang QilongTang added this to the 2.19.0 milestone Aug 21, 2023
@QilongTang
Copy link
Contributor

Now that #14248 is merged, let's rework this PR

Copy link
Contributor

@QilongTang QilongTang left a comment

Choose a reason for hiding this comment

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

LGTM, I guess in order to apply the same change on RC2.19, I will need to cherry pick the Singleton change there as well. See #14308

Removing extra space and removing unused usings
@QilongTang
Copy link
Contributor

The SearchNodeTest() test was moved to DynamoLibraryItemsTest due that in the LibraryResourceProviderTests we are not creating the DynamoModel (also there is no way to get the DynamoModel) so the Lucene Singleton is not created and is crashing.
Also I did some minor changes in the test due that the FullName contains the category (so instead of  "dyf://123.456.somepackage.{nodeName}" was replaced by "dyf://Core.Input.{nodeName}" otherwise the Code Block node is not found).
@QilongTang
Copy link
Contributor

Hi @RobertGlobant20 Given the PR check is not triggering for you right now, and there is no active job running. You may want to trigger it manually

@RobertGlobant20
Copy link
Contributor Author

Hi @RobertGlobant20 Given the PR check is not triggering for you right now, and there is no active job running. You may want to trigger it manually
@QilongTang job passed
https://master-5.jenkins.autodesk.com/job/Dynamo/job/DynamoSelfServe/job/pullRequestValidation/10856/

@QilongTang QilongTang merged commit 303a463 into DynamoDS:master Aug 24, 2023
@QilongTang
Copy link
Contributor

@RobertGlobant20 Please also cherry-pick this to RC2.19.0 branch

QilongTang pushed a commit that referenced this pull request Aug 24, 2023
* Fix Node Autocomplete Regressions (#14275)

* Fix Node Autocomplete Regressions

Due that we are adding ZeroTouchNodes during test mode around 9 tests are failing, seems that there are several nodes duplicates so each test needs to be analyzed separately.
Then in this fix I'm reverting the code for adding ZeroTouchNodes and also removing a test that will fail due to this change.

* Fix Node Autocomplete Regressions

Re-adding unit test with Failure category

* DYN-6148 Dynamo Library Lucene Search (#14287)

* DYN-6148 Dynamo Library Lucene Search

Implementing the use of Lucene Search in the Dynamo Library

* DYN-6148 Dynamo Library Lucene Search

Fixing calls to LuceneSearchUtility for using the Lucene Singleton.

* DYN-6148 Dynamo Library Lucene Search

Removing extra space and removing unused usings

* DYN-6148 Dynamo Library Lucene Search Regressions

The SearchNodeTest() test was moved to DynamoLibraryItemsTest due that in the LibraryResourceProviderTests we are not creating the DynamoModel (also there is no way to get the DynamoModel) so the Lucene Singleton is not created and is crashing.
Also I did some minor changes in the test due that the FullName contains the category (so instead of  "dyf://123.456.somepackage.{nodeName}" was replaced by "dyf://Core.Input.{nodeName}" otherwise the Code Block node is not found).
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.

2 participants