-
Notifications
You must be signed in to change notification settings - Fork 30
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
fix name bug #139
fix name bug #139
Conversation
Signed-off-by: xinyual <[email protected]>
Signed-off-by: xinyual <[email protected]>
@@ -149,9 +149,12 @@ public <T> void run(Map<String, String> parameters, ActionListener<T> listener) | |||
GetMappingsRequest getMappingsRequest = buildGetMappingRequest(indexName); | |||
client.admin().indices().getMappings(getMappingsRequest, ActionListener.<GetMappingsResponse>wrap(getMappingsResponse -> { | |||
Map<String, MappingMetadata> mappings = getMappingsResponse.getMappings(); | |||
if (mappings.size() == 0) { | |||
throw new IllegalArgumentException("No matching index with index name: " + indexName); |
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.
Seems we should useNo matching mapping with ...
, is this index from user's input?
Signed-off-by: xinyual <[email protected]>
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #139 +/- ##
============================================
- Coverage 80.83% 80.69% -0.15%
Complexity 195 195
============================================
Files 13 13
Lines 1002 1005 +3
Branches 133 134 +1
============================================
+ Hits 810 811 +1
- Misses 141 142 +1
- Partials 51 52 +1 ☔ View full report in Codecov by Sentry. |
* fix name bug Signed-off-by: xinyual <[email protected]> * apply spotless Signed-off-by: xinyual <[email protected]> * change error message Signed-off-by: xinyual <[email protected]> --------- Signed-off-by: xinyual <[email protected]> (cherry picked from commit 8074492) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* fix name bug * apply spotless * change error message --------- (cherry picked from commit 8074492) Signed-off-by: xinyual <[email protected]> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* fix name bug * apply spotless * change error message --------- (cherry picked from commit 8074492) Signed-off-by: xinyual <[email protected]> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Signed-off-by: yuye-aws <[email protected]>
Description
When we use pattern, the return metadata map is <index_name>: <index_mapping>. So we need to use the name from mapping instead of pattern name.
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.