Skip to content

Conversation

@nik9000
Copy link
Member

@nik9000 nik9000 commented Jul 30, 2020

Most core types throw back an error if the relation on a range query
is disjoint. This make runtime fields do the same.

Relates to #59332

Most core types throw back an error if the `relation` on a `range` query
is `disjoint`. This make runtime fields do the same.
@nik9000 nik9000 added the :Search/Search Search-related issues that do not fall into other categories label Jul 30, 2020
@nik9000 nik9000 requested a review from javanna July 30, 2020 15:19
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search (:Search/Search)

@elasticmachine elasticmachine added the Team:Search Meta label for search team label Jul 30, 2020
) {
if (relation == ShapeRelation.DISJOINT) {
String message = "Field [%s] of type [%s] with runtime type [%s] does not support DISJOINT ranges";
throw new IllegalArgumentException(String.format(Locale.ROOT, message, name(), typeName(), runtimeType()));
Copy link
Member Author

Choose a reason for hiding this comment

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

I went with this rather funny way of writing the message because it made the formatter happy. Most of the other options I tried caused the formatter to split the message over so many lines it wasn't readable. I don't generally like String.format for these but here it looks best, I think.

@javanna javanna mentioned this pull request Jul 30, 2020
30 tasks
@nik9000 nik9000 merged commit e1cb361 into elastic:feature/runtime_fields Jul 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Search/Search Search-related issues that do not fall into other categories Team:Search Meta label for search team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants