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 more than 1024 IP/masks with indexed field #16391

Merged
merged 7 commits into from
Nov 27, 2024

Conversation

mkhludnev
Copy link
Contributor

@mkhludnev mkhludnev commented Oct 19, 2024

Now

Proposal

  • for indexed field combine masks with MultiRangePointQuery
  • for doc_values only field still fall back to Boolean Query

Related Issues

Resolves #16200

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.

@github-actions github-actions bot added enhancement Enhancement or improvement to existing feature or request Search:Query Capabilities labels Oct 19, 2024
Copy link
Contributor

❌ Gradle check result for c9e2bd1: 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 c9e2bd1: 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 b6c3410: 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?

@mkhludnev
Copy link
Contributor Author

it's an alt of #16202

Copy link
Contributor

github-actions bot commented Nov 8, 2024

❌ Gradle check result for 6a11b54: 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 26ff736: 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?

mkhludnev referenced this pull request Nov 12, 2024
* Updating Ip fields to use doc_values to search

Signed-off-by: Harsha Vamsi Kalluri <harshavamsi096@gmail.com>

* Fix IP tests

Signed-off-by: Harsha Vamsi Kalluri <harshavamsi096@gmail.com>

* Fix skip to allow yaml test to pass on main

Signed-off-by: Harsha Vamsi Kalluri <harshavamsi096@gmail.com>

* Update tests to use existing test file

Signed-off-by: Harsha Vamsi Kalluri <harshavamsi096@gmail.com>

* Changing skip version to match bwc

Signed-off-by: Harsha Vamsi Kalluri <harshavamsi096@gmail.com>

* Using exact match instead of range

Signed-off-by: Harsha Vamsi Kalluri <harshavamsi096@gmail.com>

* Spotless

Signed-off-by: Harsha Vamsi Kalluri <harshavamsi096@gmail.com>

* Fix IP field tests

Signed-off-by: Harsha Vamsi Kalluri <harshavamsi096@gmail.com>

* Fix spotless + precommit failure

Signed-off-by: Harsha Vamsi Kalluri <harshavamsi096@gmail.com>

* Get point out of query and into value

Signed-off-by: Harsha Vamsi Kalluri <harshavamsi096@gmail.com>

* Fix term tests

Signed-off-by: Harsha Vamsi Kalluri <harshavamsi096@gmail.com>

* Add skip test logic to only doc_values test

Signed-off-by: Harsha Vamsi Kalluri <harshavamsi096@gmail.com>

---------

Signed-off-by: Harsha Vamsi Kalluri <harshavamsi096@gmail.com>
Copy link
Contributor

❌ Gradle check result for 01db875: 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 5849b96: 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 d03b618: 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 7e1f8b4: 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 c429cf0: 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?

@mkhludnev
Copy link
Contributor Author

mkhludnev commented Nov 20, 2024

Let's discuss edge cases, which are not obvious:

doc_values only field with mask/ values

In this case we can just create BooleanQuery { ssDvRangeQuery, ...}. It may lately fail with too many clauses, and it's reasonable. Note: it will be a way better with ssDvMultiRange

index & doc_values field with mask/ values

  • a strawman approach: forget about dv and IndexOrDvQuery, and just create MultiRangePointQuery

  • attempt to create IndexOrDvQuery(MultiRangePointQuery, BooleanQuery { ssDvRangeQuery, ...}) when number of BQ is less than MaxClauses limit.

The problem is that this boundary limit can't be decided on query parsing because sibling filter clauses may exceed MaxClauses limit.

Copy link
Contributor

❌ Gradle check result for cfa3904: 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?

@mkhludnev mkhludnev changed the title IP field via MultrangeQuery fix #16200 Support more than 1024 IP/masks with indexed field Nov 20, 2024
@mkhludnev mkhludnev marked this pull request as ready for review November 20, 2024 20:53
Copy link
Collaborator

@msfroh msfroh left a comment

Choose a reason for hiding this comment

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

Thanks, @mkhludnev! Looks good.

I agree that your new test should probably be marked as an IT, but otherwise I'm happy to merge.

Signed-off-by: Mikhail Khludnev <mkhl@apache.org>
Signed-off-by: Mikhail Khludnev <mkhl@apache.org>
Copy link
Contributor

✅ Gradle check result for 341e256: SUCCESS

@mkhludnev mkhludnev requested review from reta and msfroh November 26, 2024 15:13
mkhludnev and others added 2 commits November 26, 2024 22:47
Co-authored-by: Andriy Redko <drreta@gmail.com>
Signed-off-by: Mikhail Khludnev <mkhludnev@users.noreply.github.com>
Signed-off-by: Mikhail Khludnev <mkhl@apache.org>
Copy link
Contributor

❌ Gradle check result for 7aa15da: 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 7aa15da: 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: Mikhail Khludnev <mkhl@apache.org>
Copy link
Contributor

✅ Gradle check result for f6e8303: SUCCESS

@reta
Copy link
Collaborator

reta commented Nov 27, 2024

@msfroh LGTY? thanks!

@msfroh msfroh merged commit ad982c2 into opensearch-project:main Nov 27, 2024
39 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Nov 27, 2024
MultiRangeQuery for searching IP masks more 1025 masks in indexed field.

---------

Signed-off-by: Mikhail Khludnev <mkhl@apache.org>
Signed-off-by: Mikhail Khludnev <mkhludnev@users.noreply.github.com>
Co-authored-by: Andriy Redko <drreta@gmail.com>
(cherry picked from commit ad982c2)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
reta added a commit that referenced this pull request Nov 28, 2024
MultiRangeQuery for searching IP masks more 1025 masks in indexed field.

---------




(cherry picked from commit ad982c2)

Signed-off-by: Mikhail Khludnev <mkhl@apache.org>
Signed-off-by: Mikhail Khludnev <mkhludnev@users.noreply.github.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>
Co-authored-by: Andriy Redko <drreta@gmail.com>
@mkhludnev
Copy link
Contributor Author

Thank you so much, @reta @msfroh!

@reta
Copy link
Collaborator

reta commented Nov 28, 2024

Thank you so much, @reta @msfroh!

Thanks to you @mkhludnev !

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 enhancement Enhancement or improvement to existing feature or request Search:Query Capabilities v2.19.0 Issues and PRs related to version 2.19.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.

[Feature Request] relax max Clauses Count limitation of termS query over IP field
3 participants