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

fix(es): Improve match #140

Merged
merged 12 commits into from
Jul 14, 2022
Merged

fix(es): Improve match #140

merged 12 commits into from
Jul 14, 2022

Conversation

zhenlei520
Copy link
Contributor

Description

Improve match

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

  • Code compiles correctly
  • Created/updated tests
  • Extended the documentation

@zhenlei520 zhenlei520 requested a review from doddgu July 13, 2022 10:15
Copy link
Contributor

@doddgu doddgu left a comment

Choose a reason for hiding this comment

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

LGTM

# Conflicts:
#	src/BuildingBlocks/MASA.BuildingBlocks
if (keyword.Equals("*"))
return keyword;

return $"(*{keyword.Trim('*')}* OR {keyword.Trim('*')} OR *{keyword.Trim('*')} OR {keyword.Trim('*')}*)";
Copy link
Contributor

Choose a reason for hiding this comment

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

  1. Just need trim once.
  2. Why should *- and -*?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Processed

@zhenlei520 zhenlei520 requested a review from doddgu July 14, 2022 01:38
@@ -93,7 +93,7 @@ private string CompleteKeyword(string keyword)
if (keyword.Equals("*"))
return keyword;

return $"(*{keyword.Trim('*')}* OR {keyword.Trim('*')} OR *{keyword.Trim('*')} OR {keyword.Trim('*')}*)";
return $"({keyword.Trim('*')} OR *{keyword.Trim('*')} OR {keyword.Trim('*')}*)";
Copy link
Contributor

Choose a reason for hiding this comment

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

Trim once.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Processed

@zhenlei520 zhenlei520 requested a review from doddgu July 14, 2022 08:36
Copy link
Contributor

@doddgu doddgu left a comment

Choose a reason for hiding this comment

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

LGTM

@doddgu doddgu merged commit 8486809 into main Jul 14, 2022
@doddgu doddgu deleted the fix/es branch July 14, 2022 08:54
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