-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Move runtime fields to server #69223
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
Merged
javanna
merged 19 commits into
elastic:master
from
javanna:refactoring/runtime_fields_move_server
Feb 22, 2021
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
b3e7fb1
move prod classes
javanna 903fee0
move test classes
javanna c06adee
update license header
javanna 150417d
remove runtime fields plugin mention from tests
javanna 4b2861a
remove dynamic runtime fields builder extension point
javanna 7488339
make runtime fields types built-in
javanna 42a8f79
move runtime fields contexts into core contexts
javanna dd6c544
move whitelists to painless lang plugin
javanna e8e0067
rename packages
javanna ded4325
remove test plugin
javanna 5140a06
fix RootObjectMapperTests
javanna 653adec
update DynamicTemplatesTests
javanna 4ba6075
address ScriptServiceTests, update MockScriptEngine with newly added …
javanna fd4df64
spotless
javanna b40560f
Merge branch 'master' into refactoring/runtime_fields_move_server
javanna b8b01bd
testing conventions
javanna 5329b01
Merge branch 'master' into refactoring/runtime_fields_move_server
javanna a52860d
add test
javanna 4197d38
Merge branch 'master' into refactoring/runtime_fields_move_server
javanna File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
...main/resources/org/elasticsearch/painless/spi/org.elasticsearch.runtimefields.boolean.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# | ||
# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
# or more contributor license agreements. Licensed under the Elastic License | ||
# 2.0 and the Server Side Public License, v 1; you may not use this file except | ||
# in compliance with, at your election, the Elastic License 2.0 or the Server | ||
# Side Public License, v 1. | ||
# | ||
|
||
# The whitelist for boolean-valued runtime fields | ||
|
||
# These two whitelists are required for painless to find the classes | ||
class org.elasticsearch.runtimefields.mapper.BooleanFieldScript @no_import { | ||
} | ||
class org.elasticsearch.runtimefields.mapper.BooleanFieldScript$Factory @no_import { | ||
} | ||
|
||
static_import { | ||
# The `emit` callback to collect values for the field | ||
void emit(org.elasticsearch.runtimefields.mapper.BooleanFieldScript, boolean) bound_to org.elasticsearch.runtimefields.mapper.BooleanFieldScript$Emit | ||
} | ||
|
25 changes: 25 additions & 0 deletions
25
...rc/main/resources/org/elasticsearch/painless/spi/org.elasticsearch.runtimefields.date.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# | ||
# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
# or more contributor license agreements. Licensed under the Elastic License | ||
# 2.0 and the Server Side Public License, v 1; you may not use this file except | ||
# in compliance with, at your election, the Elastic License 2.0 or the Server | ||
# Side Public License, v 1. | ||
# | ||
|
||
# The whitelist for date-valued runtime fields | ||
|
||
# These two whitelists are required for painless to find the classes | ||
class org.elasticsearch.runtimefields.mapper.DateFieldScript @no_import { | ||
} | ||
class org.elasticsearch.runtimefields.mapper.DateFieldScript$Factory @no_import { | ||
} | ||
|
||
static_import { | ||
# The `emit` callback to collect values for the field | ||
void emit(org.elasticsearch.runtimefields.mapper.DateFieldScript, long) bound_to org.elasticsearch.runtimefields.mapper.DateFieldScript$Emit | ||
# Parse a value from the source to millis since epoch | ||
long parse(org.elasticsearch.runtimefields.mapper.DateFieldScript, def) bound_to org.elasticsearch.runtimefields.mapper.DateFieldScript$Parse | ||
} | ||
|
||
|
||
|
21 changes: 21 additions & 0 deletions
21
.../main/resources/org/elasticsearch/painless/spi/org.elasticsearch.runtimefields.double.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# | ||
# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
# or more contributor license agreements. Licensed under the Elastic License | ||
# 2.0 and the Server Side Public License, v 1; you may not use this file except | ||
# in compliance with, at your election, the Elastic License 2.0 or the Server | ||
# Side Public License, v 1. | ||
# | ||
|
||
# The whitelist for double-valued runtime fields | ||
|
||
# These two whitelists are required for painless to find the classes | ||
class org.elasticsearch.runtimefields.mapper.DoubleFieldScript @no_import { | ||
} | ||
class org.elasticsearch.runtimefields.mapper.DoubleFieldScript$Factory @no_import { | ||
} | ||
|
||
static_import { | ||
# The `emit` callback to collect values for the field | ||
void emit(org.elasticsearch.runtimefields.mapper.DoubleFieldScript, double) bound_to org.elasticsearch.runtimefields.mapper.DoubleFieldScript$Emit | ||
} | ||
|
20 changes: 20 additions & 0 deletions
20
...ain/resources/org/elasticsearch/painless/spi/org.elasticsearch.runtimefields.geopoint.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# | ||
# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
# or more contributor license agreements. Licensed under the Elastic License | ||
# 2.0 and the Server Side Public License, v 1; you may not use this file except | ||
# in compliance with, at your election, the Elastic License 2.0 or the Server | ||
# Side Public License, v 1. | ||
# | ||
|
||
# The whitelist for ip-valued runtime fields | ||
|
||
# These two whitelists are required for painless to find the classes | ||
class org.elasticsearch.runtimefields.mapper.GeoPointFieldScript @no_import { | ||
} | ||
class org.elasticsearch.runtimefields.mapper.GeoPointFieldScript$Factory @no_import { | ||
} | ||
|
||
static_import { | ||
# The `emit` callback to collect values for the field | ||
void emit(org.elasticsearch.runtimefields.mapper.GeoPointFieldScript, double, double) bound_to org.elasticsearch.runtimefields.mapper.GeoPointFieldScript$Emit | ||
} |
20 changes: 20 additions & 0 deletions
20
.../src/main/resources/org/elasticsearch/painless/spi/org.elasticsearch.runtimefields.ip.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# | ||
# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
# or more contributor license agreements. Licensed under the Elastic License | ||
# 2.0 and the Server Side Public License, v 1; you may not use this file except | ||
# in compliance with, at your election, the Elastic License 2.0 or the Server | ||
# Side Public License, v 1. | ||
# | ||
|
||
# The whitelist for ip-valued runtime fields | ||
|
||
# These two whitelists are required for painless to find the classes | ||
class org.elasticsearch.runtimefields.mapper.IpFieldScript @no_import { | ||
} | ||
class org.elasticsearch.runtimefields.mapper.IpFieldScript$Factory @no_import { | ||
} | ||
|
||
static_import { | ||
# The `emit` callback to collect values for the field | ||
void emit(org.elasticsearch.runtimefields.mapper.IpFieldScript, String) bound_to org.elasticsearch.runtimefields.mapper.IpFieldScript$Emit | ||
} |
20 changes: 20 additions & 0 deletions
20
...rc/main/resources/org/elasticsearch/painless/spi/org.elasticsearch.runtimefields.long.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# | ||
# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
# or more contributor license agreements. Licensed under the Elastic License | ||
# 2.0 and the Server Side Public License, v 1; you may not use this file except | ||
# in compliance with, at your election, the Elastic License 2.0 or the Server | ||
# Side Public License, v 1. | ||
# | ||
|
||
# The whitelist for long-valued runtime fields | ||
|
||
# These two whitelists are required for painless to find the classes | ||
class org.elasticsearch.runtimefields.mapper.LongFieldScript @no_import { | ||
} | ||
class org.elasticsearch.runtimefields.mapper.LongFieldScript$Factory @no_import { | ||
} | ||
|
||
static_import { | ||
# The `emit` callback to collect values for the field | ||
void emit(org.elasticsearch.runtimefields.mapper.LongFieldScript, long) bound_to org.elasticsearch.runtimefields.mapper.LongFieldScript$Emit | ||
} |
20 changes: 20 additions & 0 deletions
20
.../main/resources/org/elasticsearch/painless/spi/org.elasticsearch.runtimefields.string.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# | ||
# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
# or more contributor license agreements. Licensed under the Elastic License | ||
# 2.0 and the Server Side Public License, v 1; you may not use this file except | ||
# in compliance with, at your election, the Elastic License 2.0 or the Server | ||
# Side Public License, v 1. | ||
# | ||
|
||
# The whitelist for string-valued runtime fields | ||
|
||
# These two whitelists are required for painless to find the classes | ||
class org.elasticsearch.runtimefields.mapper.StringFieldScript @no_import { | ||
} | ||
class org.elasticsearch.runtimefields.mapper.StringFieldScript$Factory @no_import { | ||
} | ||
|
||
static_import { | ||
# The `emit` callback to collect values for the field | ||
void emit(org.elasticsearch.runtimefields.mapper.StringFieldScript, String) bound_to org.elasticsearch.runtimefields.mapper.StringFieldScript$Emit | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
So good to see this gone!
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.
yes that is what I thought too. There is more to do to simplify the abstractions here, but removing the extension point and some of the shenanigans around it feels good.