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

Adding query fuzziness validation #5805

Merged
merged 14 commits into from
Mar 8, 2023

Conversation

sejli
Copy link
Member

@sejli sejli commented Jan 10, 2023

Description

Validates fuzziness query and returns error message on invalid fuzziness values

Issues Resolved

#4223

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff
  • Commit changes are listed out in CHANGELOG.md file (See: Changelog)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Sean Li <[email protected]>
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@@ -189,7 +189,13 @@ public static Fuzziness parse(XContentParser parser) throws IOException {
return build(fuzziness);
}
} catch (NumberFormatException ex) {
return build(fuzziness);
// Validating if the inputted Fuzziness value is a float. If not, it is an invalid string.
Copy link
Contributor

@noCharger noCharger Jan 11, 2023

Choose a reason for hiding this comment

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

non blocking comment -
'Validate if the fuzziness is formatted correctly as a numeric value.'

Copy link
Member Author

Choose a reason for hiding this comment

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

addressed in 4409f99

Copy link
Contributor

@noCharger noCharger left a comment

Choose a reason for hiding this comment

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

Approved with one nit comment

Signed-off-by: Sean Li <[email protected]>
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

github-actions bot commented Mar 8, 2023

Gradle Check (Jenkins) Run Completed with:

Signed-off-by: Sean Li <[email protected]>
@github-actions
Copy link
Contributor

github-actions bot commented Mar 8, 2023

Gradle Check (Jenkins) Run Completed with:

@codecov-commenter
Copy link

codecov-commenter commented Mar 8, 2023

Codecov Report

Merging #5805 (2980409) into main (8c0e5d0) will decrease coverage by 0.11%.
The diff coverage is 100.00%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@             Coverage Diff              @@
##               main    #5805      +/-   ##
============================================
- Coverage     70.77%   70.67%   -0.11%     
+ Complexity    59125    59068      -57     
============================================
  Files          4804     4804              
  Lines        283098   283101       +3     
  Branches      40813    40813              
============================================
- Hits         200372   200077     -295     
- Misses        66269    66623     +354     
+ Partials      16457    16401      -56     
Impacted Files Coverage Δ
...ain/java/org/opensearch/common/unit/Fuzziness.java 85.00% <100.00%> (+0.46%) ⬆️
...adonly/AddIndexBlockClusterStateUpdateRequest.java 0.00% <0.00%> (-75.00%) ⬇️
...readonly/TransportVerifyShardIndexBlockAction.java 9.75% <0.00%> (-73.18%) ⬇️
...n/admin/indices/readonly/AddIndexBlockRequest.java 17.85% <0.00%> (-53.58%) ⬇️
.../java/org/opensearch/node/NodeClosedException.java 50.00% <0.00%> (-50.00%) ⬇️
...ava/org/opensearch/action/NoSuchNodeException.java 0.00% <0.00%> (-50.00%) ⬇️
...a/org/opensearch/tasks/TaskCancelledException.java 50.00% <0.00%> (-50.00%) ⬇️
.../opensearch/client/indices/CloseIndexResponse.java 42.50% <0.00%> (-48.75%) ⬇️
...opensearch/persistent/PersistentTasksExecutor.java 22.22% <0.00%> (-44.45%) ⬇️
...adcast/BroadcastShardOperationFailedException.java 55.55% <0.00%> (-44.45%) ⬇️
... and 492 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

CHANGELOG.md Outdated Show resolved Hide resolved
@github-actions
Copy link
Contributor

github-actions bot commented Mar 8, 2023

Gradle Check (Jenkins) Run Completed with:

@reta reta merged commit add1871 into opensearch-project:main Mar 8, 2023
@reta reta added bug Something isn't working backport 2.x Backport to 2.x branch labels Mar 8, 2023
opensearch-trigger-bot bot pushed a commit that referenced this pull request Mar 8, 2023
* Adding fuzziness validation

Signed-off-by: Sean Li <[email protected]>

* Updating imports

Signed-off-by: Sean Li <[email protected]>

* Adding fuzziness validation

Signed-off-by: Sean Li <[email protected]>

* Updating imports

Signed-off-by: Sean Li <[email protected]>

* removing comments

Signed-off-by: Sean Li <[email protected]>

* running spotlessApply

Signed-off-by: Sean Li <[email protected]>

* updating CHANGELOG.md

Signed-off-by: Sean Li <[email protected]>

* resolving reviews

Signed-off-by: Sean Li <[email protected]>

* revising comment

Signed-off-by: Sean Li <[email protected]>

* updating CHANGELOG.md

Signed-off-by: Sean Li <[email protected]>

* moving fix to 2.x in CHANGELOG.md

Signed-off-by: Sean Li <[email protected]>

---------

Signed-off-by: Sean Li <[email protected]>
(cherry picked from commit add1871)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
reta pushed a commit that referenced this pull request Mar 9, 2023
* Adding fuzziness validation



* Updating imports



* Adding fuzziness validation



* Updating imports



* removing comments



* running spotlessApply



* updating CHANGELOG.md



* resolving reviews



* revising comment



* updating CHANGELOG.md



* moving fix to 2.x in CHANGELOG.md



---------


(cherry picked from commit add1871)

Signed-off-by: Sean Li <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
mingshl pushed a commit to mingshl/OpenSearch-Mingshl that referenced this pull request Mar 24, 2023
* Adding fuzziness validation

Signed-off-by: Sean Li <[email protected]>

* Updating imports

Signed-off-by: Sean Li <[email protected]>

* Adding fuzziness validation

Signed-off-by: Sean Li <[email protected]>

* Updating imports

Signed-off-by: Sean Li <[email protected]>

* removing comments

Signed-off-by: Sean Li <[email protected]>

* running spotlessApply

Signed-off-by: Sean Li <[email protected]>

* updating CHANGELOG.md

Signed-off-by: Sean Li <[email protected]>

* resolving reviews

Signed-off-by: Sean Li <[email protected]>

* revising comment

Signed-off-by: Sean Li <[email protected]>

* updating CHANGELOG.md

Signed-off-by: Sean Li <[email protected]>

* moving fix to 2.x in CHANGELOG.md

Signed-off-by: Sean Li <[email protected]>

---------

Signed-off-by: Sean Li <[email protected]>
Signed-off-by: Mingshi Liu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x Backport to 2.x branch bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants