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

support rangeQuery and regexpQuery in constant_keyword field type #14711

Merged
merged 6 commits into from
Aug 2, 2024

Conversation

kkewwei
Copy link
Contributor

@kkewwei kkewwei commented Jul 11, 2024

Description

Support rangeQuery and regexpQuery in constant_keyword field type

Related Issues

Resolves #[Issue number to be closed when this PR is merged]

Check List

  • Functionality includes testing.
  • API changes companion pull request created, if applicable.
  • Public documentation issue/PR created, if applicable.

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.

Copy link
Contributor

❌ Gradle check result for 72a3ba8: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Copy link
Contributor

✅ Gradle check result for 3cd9c3e: SUCCESS

Copy link

codecov bot commented Jul 11, 2024

Codecov Report

Attention: Patch coverage is 88.23529% with 2 lines in your changes missing coverage. Please review.

Project coverage is 71.86%. Comparing base (d4e7766) to head (0ebfcb3).

Files Patch % Lines
...earch/index/mapper/ConstantKeywordFieldMapper.java 88.23% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #14711      +/-   ##
============================================
- Coverage     71.87%   71.86%   -0.01%     
- Complexity    62811    62824      +13     
============================================
  Files          5169     5169              
  Lines        294646   294663      +17     
  Branches      42610    42616       +6     
============================================
- Hits         211778   211773       -5     
- Misses        65415    65447      +32     
+ Partials      17453    17443      -10     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kkewwei
Copy link
Contributor Author

kkewwei commented Jul 25, 2024

@gaobinlon, can you please have a look when you are free, thank you.

@kkewwei
Copy link
Contributor Author

kkewwei commented Aug 1, 2024

@dblock can you help review the PR? very thank you.

Copy link
Member

@dblock dblock left a comment

Choose a reason for hiding this comment

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

Looks good. Definitely needs a CHANGELOG.

Please don't forget to add spec and tests to https://github.com/opensearch-project/opensearch-api-specification.

@kkewwei kkewwei force-pushed the support_rangeQuery branch 2 times, most recently from 50459c2 to 5ac62b4 Compare August 1, 2024 13:39
Copy link
Contributor

github-actions bot commented Aug 1, 2024

❌ Gradle check result for 50459c2: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Copy link
Contributor

github-actions bot commented Aug 2, 2024

❌ Gradle check result for e72dae3: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Copy link
Contributor

github-actions bot commented Aug 2, 2024

❌ Gradle check result for abb776f: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Signed-off-by: kkewwei <kkewwei@163.com>
Signed-off-by: kkewwei <kkewwei@163.com>

add rest api spec tests

Signed-off-by: kkewwei <kkewwei@163.com>
Signed-off-by: kkewwei <kkewwei@163.com>
Signed-off-by: kkewwei <kkewwei@163.com>
Signed-off-by: kkewwei <kkewwei@163.com>
Copy link
Contributor

github-actions bot commented Aug 2, 2024

✅ Gradle check result for 0ebfcb3: SUCCESS

Copy link
Collaborator

@reta reta left a comment

Choose a reason for hiding this comment

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

@msfroh your concerns cleared out? thanks!

@reta reta added v3.0.0 Issues and PRs related to version 3.0.0 v2.17.0 labels Aug 2, 2024
@msfroh
Copy link
Collaborator

msfroh commented Aug 2, 2024

For IndexFieldType, it is used for index name matching. Index name matching can support wildcard matching, but does not support regexp and range matching.

Not yet!

So it seems useless to putrangeQuery and regexpQuery in the parent class at present .

The idea is that if we do move it to the parent, then we can support these query types on index names.

Again, though -- I think we can safely defer that to another issue. (I don't even know if anyone actually wants to be able to filter on index names by range or regex.)

@msfroh msfroh merged commit bd226c2 into opensearch-project:main Aug 2, 2024
40 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Aug 2, 2024
…4711)

---------

Signed-off-by: kkewwei <kkewwei@163.com>
(cherry picked from commit bd226c2)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
jed326 pushed a commit that referenced this pull request Aug 2, 2024
…4711) (#15093)

---------


(cherry picked from commit bd226c2)

Signed-off-by: kkewwei <kkewwei@163.com>
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>
@kkewwei kkewwei deleted the support_rangeQuery branch August 3, 2024 01:54
harshavamsi pushed a commit to harshavamsi/OpenSearch that referenced this pull request Aug 20, 2024
wdongyu pushed a commit to wdongyu/OpenSearch that referenced this pull request Aug 22, 2024
akolarkunnu pushed a commit to akolarkunnu/OpenSearch that referenced this pull request Sep 10, 2024
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 v2.17.0 v3.0.0 Issues and PRs related to version 3.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants