Skip to content

(dsl): Support IP range aggregation #650

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

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

markok4
Copy link

@markok4 markok4 commented Jun 18, 2025

Part of #118

Copy link
Contributor

Choose a reason for hiding this comment

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

This file still have issues with format, and also it has special ^M characters

@@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
Copy link
Contributor

Choose a reason for hiding this comment

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

?

from = b.from,
to = b.to,
docCount = b.docCount,
subAggregations = Map.empty
Copy link
Member

Choose a reason for hiding this comment

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

@dbulaja98, up there, we have withSubAggregations. Is this correct implementation then?

@drmarjanovic
Copy link
Member

An additional note:

  • You are missing a reference to the issue.

subAggregations: Option[Chunk[SingleElasticAggregation]]
) extends IpRangeAggregation { self =>

def keyedOn: IpRangeAggregation = self.copy(keyed = Some(true))
Copy link
Member

Choose a reason for hiding this comment

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

I guess we can use only keyed.


def key(value: String): IpRangeBound = self.copy(key = Some(value))

def toJson: Json = {
Copy link
Member

Choose a reason for hiding this comment

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

Can we put private[elasticsearch] here?

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.

3 participants