-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Deprecate types in get field mapping API #37667
Merged
mayya-sharipova
merged 4 commits into
elastic:master
from
mayya-sharipova:deprecate_types_indices_get_field_mapping
Jan 23, 2019
Merged
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
9e0801c
Deprecate types in get field mapping API
mayya-sharipova 5343850
Address Julie's and Michael's comments
mayya-sharipova d33a654
Address Julie's comments 2
mayya-sharipova a9fd592
Merge remote-tracking branch 'upstream/master' into deprecate_types_i…
mayya-sharipova 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 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 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
92 changes: 92 additions & 0 deletions
92
...st-high-level/src/main/java/org/elasticsearch/client/indices/GetFieldMappingsRequest.java
This file contains 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,92 @@ | ||
/* | ||
* 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.client.indices; | ||
|
||
import org.elasticsearch.action.support.IndicesOptions; | ||
import org.elasticsearch.client.Validatable; | ||
import org.elasticsearch.common.Strings; | ||
|
||
/** Request the mappings of specific fields */ | ||
public class GetFieldMappingsRequest implements Validatable { | ||
|
||
protected boolean local = false; | ||
|
||
private String[] fields = Strings.EMPTY_ARRAY; | ||
|
||
private boolean includeDefaults = false; | ||
|
||
private String[] indices = Strings.EMPTY_ARRAY; | ||
|
||
private IndicesOptions indicesOptions = IndicesOptions.strictExpandOpen(); | ||
|
||
public GetFieldMappingsRequest() {} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Small comment: do we need this constructor? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is nothing actually required here in the request? If not then it makes sense to remove it |
||
|
||
/** | ||
* Indicate whether the receiving node should operate based on local index information or forward requests, | ||
* where needed, to other nodes. If running locally, request will not raise errors if running locally & missing indices. | ||
*/ | ||
public GetFieldMappingsRequest local(boolean local) { | ||
this.local = local; | ||
return this; | ||
} | ||
|
||
public boolean local() { | ||
return local; | ||
} | ||
|
||
public GetFieldMappingsRequest indices(String... indices) { | ||
this.indices = indices; | ||
return this; | ||
} | ||
|
||
public GetFieldMappingsRequest indicesOptions(IndicesOptions indicesOptions) { | ||
this.indicesOptions = indicesOptions; | ||
return this; | ||
} | ||
|
||
public String[] indices() { | ||
return indices; | ||
} | ||
|
||
public IndicesOptions indicesOptions() { | ||
return indicesOptions; | ||
} | ||
|
||
/** @param fields a list of fields to retrieve the mapping for */ | ||
public GetFieldMappingsRequest fields(String... fields) { | ||
this.fields = fields; | ||
return this; | ||
} | ||
|
||
public String[] fields() { | ||
return fields; | ||
} | ||
|
||
public boolean includeDefaults() { | ||
return includeDefaults; | ||
} | ||
|
||
/** Indicates whether default mapping settings should be returned */ | ||
public GetFieldMappingsRequest includeDefaults(boolean includeDefaults) { | ||
this.includeDefaults = includeDefaults; | ||
return this; | ||
} | ||
|
||
} |
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.
Small comment, can this be
private
?