-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Allow ip_range to accept CIDR notation #27192
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change looks good, I left a comment about the test.
ParsedDocument doc = | ||
mapper.parse(SourceToParse.source("test", "type", "1", XContentFactory.jsonBuilder() | ||
.startObject() | ||
.field("field", "192.168.0.0/16") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you test something that is not byte-aligned, like /15 or /17? We used to have bugs in those cases.
@jpountz done, added the non-aligned test cases as well :) |
1099934
to
88e84e9
Compare
Same as in the other PR, failed BWC => rebased against master to fix. |
@dakrone this one's green after rebase now as well :) |
* es/master: Fix snapshot getting stuck in INIT state (#27214) Add an example of dynamic field names (#27255) #26260 Allow ip_range to accept CIDR notation (#27192) #27189 Fixed rounding of bounds in scaled float comparison (#27207) Add support for Gradle 4.3 (#27249) Fixes QueryStringQueryBuilderTests build: Fix setting the incorrect bwc version in mixed cluster qa module [Test] Fix QueryStringQueryBuilderTests.testExistsFieldQuery BWC Adjust assertions for sequence numbers BWC tests Do not create directories if repository is readonly (#26909) [Test] Fix InternalStatsTests [Test] Fix QueryStringQueryBuilderTests.testExistsFieldQuery Uses norms for exists query if enabled (#27237) Reinstate recommendation for ≥ 3 master-eligible nodes. (#27204)
* 6.x: Add an example of dynamic field names (#27255) fixed checkstyle violation #26260 Allow ip_range to accept CIDR notation (#27192) #27189 Fixed rounding of bounds in scaled float comparison (#27207) [TEST] Fix failing exists query test test: Do not run old parent/child tests against a cluster with minimum version greater than 6.0.0 Add support for Gradle 4.3 (#27249) Fixes QueryStringQueryBuilderTests build: Fix setting the incorrect bwc version in mixed cluster qa module fix compil after backport [Test] Fix QueryStringQueryBuilderTests.testExistsFieldQuery BWC Adjust assertions for sequence numbers BWC tests Do not create directories if repository is readonly (#26909) [Test] Fix QueryStringQueryBuilderTests.testExistsFieldQuery Uses norms for exists query if enabled (#27237) Reinstate recommendation for ≥ 3 master-eligible nodes. (#27204)
My attempt at #26260 :
org.elasticsearch.search.aggregations.bucket.range.IpRangeAggregationBuilder.Range#Range(java.lang.String, java.lang.String)
for the parsing (with some minor simplifications that could be made here by fixing the include/exclude behaviour of the boundaries)IpRangeFieldMapperTests
since there were only (at least as far as I could find) generic test classes that covered allRange
types in a loop that applied here