-
Notifications
You must be signed in to change notification settings - Fork 25.3k
Introduce dynamic runtime setting #65489
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 29 commits into
elastic:master
from
javanna:enhancement/dynamic_runtime_mode
Dec 8, 2020
Merged
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
4616173
WIP: introduce new dynamic runtime setting
javanna 5f037e4
Merge branch 'master' into enhancement/dynamic_runtime_mode
javanna 34ed399
iter
javanna 8b2bcaa
iter
javanna 0841dc1
iter
javanna 07de311
Merge branch 'master' into enhancement/dynamic_runtime_mode
javanna d5587f7
checkstyle
javanna 222321d
iter
javanna e08844e
iter
javanna 26a559a
Merge branch 'master' into enhancement/dynamic_runtime_mode
javanna f528d26
fix date creation
javanna 776fb4e
iter
javanna 3a9e625
docs and rename
javanna 8952c53
iter
javanna edc6a29
Merge branch 'master' into enhancement/dynamic_runtime_mode
javanna c2e9797
iter and some tests
javanna 114b5f4
spotless
javanna 9e6f13e
iter
javanna 613b882
iter
javanna f5fc23f
missing javadoc
javanna 2b05ca3
iter
javanna e64ad64
Merge branch 'master' into enhancement/dynamic_runtime_mode
javanna b1918f8
iter
javanna 1920acd
iter
javanna 7a557db
Merge branch 'master' into enhancement/dynamic_runtime_mode
javanna d10f0d5
spotless
javanna bcd0f50
fix date format and add tests
javanna 7c600c3
spotless
javanna 540f335
one more test
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
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
252 changes: 68 additions & 184 deletions
252
server/src/main/java/org/elasticsearch/index/mapper/DocumentParser.java
Large diffs are not rendered by default.
Oops, something went wrong.
322 changes: 322 additions & 0 deletions
322
server/src/main/java/org/elasticsearch/index/mapper/DynamicFieldsBuilder.java
Large diffs are not rendered by default.
Oops, something went wrong.
56 changes: 56 additions & 0 deletions
56
server/src/main/java/org/elasticsearch/index/mapper/DynamicRuntimeFieldsBuilder.java
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,56 @@ | ||
/* | ||
* Licensed to Elasticsearch under one or more contributor | ||
* license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright | ||
* ownership. Elasticsearch licenses this file to you 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 | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
package org.elasticsearch.index.mapper; | ||
|
||
import org.elasticsearch.common.time.DateFormatter; | ||
import org.elasticsearch.plugins.MapperPlugin; | ||
|
||
import static org.elasticsearch.index.mapper.ObjectMapper.Dynamic; | ||
|
||
/** | ||
* Defines how runtime fields are dynamically created. Used when objects are mapped with dynamic:runtime. | ||
* Plugins that provide runtime field implementations can also plug in their implementation of this interface | ||
* to define how leaf fields of each supported type can be dynamically created in dynamic runtime mode. | ||
* | ||
* @see MapperPlugin#getDynamicRuntimeFieldsBuilder() | ||
* @see Dynamic | ||
*/ | ||
public interface DynamicRuntimeFieldsBuilder { | ||
/** | ||
* Dynamically creates a runtime field from a parsed string value | ||
*/ | ||
RuntimeFieldType newDynamicStringField(String name); | ||
/** | ||
* Dynamically creates a runtime field from a parsed long value | ||
*/ | ||
RuntimeFieldType newDynamicLongField(String name); | ||
/** | ||
* Dynamically creates a runtime field from a parsed double value | ||
*/ | ||
RuntimeFieldType newDynamicDoubleField(String name); | ||
/** | ||
* Dynamically creates a runtime field from a parsed boolean value | ||
*/ | ||
RuntimeFieldType newDynamicBooleanField(String name); | ||
/** | ||
* Dynamically creates a runtime field from a parsed date value | ||
*/ | ||
RuntimeFieldType newDynamicDateField(String name, DateFormatter dateFormatter); | ||
} |
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.
Uh oh!
There was an error while loading. Please reload this page.