-
Notifications
You must be signed in to change notification settings - Fork 16
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
feat: #87 implemented rest endpoint to make stats available #90
feat: #87 implemented rest endpoint to make stats available #90
Conversation
…vailable Signed-off-by: Johannes Peter <[email protected]>
Signed-off-by: Johannes Peter <[email protected]>
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.
LGTM
@@ -75,7 +76,7 @@ public String getLtrStoreHealthStatus(String storeName) { | |||
clusterService.state().getRoutingTable().index(storeName) | |||
); | |||
|
|||
return indexHealth.getStatus().name().toLowerCase(); | |||
return indexHealth.getStatus().name().toLowerCase(Locale.ROOT); |
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.
Not for this line.
Why do we use default locale here https://github.com/opensearch-project/opensearch-learning-to-rank-base/blob/main/src/main/java/com/o19s/es/termstat/TermStatQueryBuilder.java#L154-L155
AggrType aggrType = AggrType.valueOf(aggr.toUpperCase(Locale.getDefault()));
AggrType posAggrType = AggrType.valueOf(pos_aggr.toUpperCase(Locale.getDefault()));
Signed-off-by: Johannes Peter <[email protected]>
@@ -75,7 +76,7 @@ public String getLtrStoreHealthStatus(String storeName) { | |||
clusterService.state().getRoutingTable().index(storeName) | |||
); | |||
|
|||
return indexHealth.getStatus().name().toLowerCase(); | |||
return indexHealth.getStatus().name().toLowerCase(Locale.getDefault()); | |||
} |
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.
Default as this is displayed
AggrType aggrType = AggrType.valueOf(aggr.toUpperCase(Locale.getDefault())); | ||
AggrType posAggrType = AggrType.valueOf(pos_aggr.toUpperCase(Locale.getDefault())); | ||
AggrType aggrType = AggrType.valueOf(aggr.toUpperCase(Locale.ROOT)); | ||
AggrType posAggrType = AggrType.valueOf(pos_aggr.toUpperCase(Locale.ROOT)); | ||
|
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.
Root as this is used for logic
Description
As of now, LTRStats are collected, but not accessible via a REST endpoint. The feature is expected to return LTRStats as a map for URL path admin/ltr/stats.
Issues Resolved
#87
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.