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-6037 lucene overloaded nodes #14136

Merged
merged 4 commits into from
Jul 11, 2023
Merged

DYN-6037 lucene overloaded nodes #14136

merged 4 commits into from
Jul 11, 2023

Conversation

RobertGlobant20
Copy link
Contributor

Purpose

Fixing Lucene search result for overloaded nodes.
Some nodes were missing for the search due that were overloaded so the same node was added several times in the search results without considering the parameters.
The fix was indexing also the parameters so when executing the search we need to also match the parameters.

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

Fixing Lucene search result for overloaded nodes.

Reviewers

@QilongTang @reddyashish

FYIs

Some nodes were missing for the search due that were overloaded so the same node was added several times in the search results without considering the parameters.
The fix was indexing also the parameters so when executing the search we need to also match the parameters.
@RobertGlobant20
Copy link
Contributor Author

This is a GIF showing the search results after my fix:
SearchOverloadedNodes

if (e.Parameters == null)
return string.IsNullOrEmpty(parameters);
else
return e.Parameters.Equals(parameters);
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you put comments for this block, not too intuitive to me

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've added more comments please let me know if the explanation is clear. Thanks
commit: 6bc39b7

Adding comments for explaining a piece of code.
@avidit avidit changed the title Dyn 6037 lucene overloaded nodes DYN-6037 lucene overloaded nodes Jul 7, 2023
@@ -138,7 +143,8 @@ public enum IndexFieldsEnum
nameof(IndexFieldsEnum.Description),
Copy link
Contributor

@reddyashish reddyashish Jul 10, 2023

Choose a reason for hiding this comment

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

Change the Enum name from IndexFieldsEnum to NodeIndexFields, as it is specific to that?

Copy link
Contributor

Choose a reason for hiding this comment

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

agreed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've renamed IndexFieldsEnum to NodeIndexFields
commit: fab8b07

Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry for the confusion, I just saw that the same enum property is used in PackageIndexFields also and one of the enum values is "Hosts". Not a big deal, you can revert this last name change if you want.

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.

One comment then LGTM

Renaming IndexFieldsEnum to NodeFieldsEnum.
@QilongTang
Copy link
Contributor

@RobertGlobant20 can you check if the regressions are real?

@reddyashish
Copy link
Contributor

Failing test is a ASM loading exception on visualization tests.

@QilongTang QilongTang merged commit c91c6f8 into DynamoDS:master Jul 11, 2023
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.

3 participants