dsmiley commented on code in PR #3355:
URL: https://github.com/apache/solr/pull/3355#discussion_r2113950364
##########
solr/core/src/test/org/apache/solr/search/facet/SpatialHeatmapFacetsTest.java:
##########
@@ -441,11 +438,11 @@ public void testJsonFacets() throws Exception {
+ " } "
+ "}"));
{
- final NamedList<?> q1Res =
- (NamedList<?>) response.getResponse().findRecursive("facets",
"q1");
+ NamedList<Object> entries1 = response.getResponse();
Review Comment:
inline. In general, if we have a var name blahBlah1 (number at end), you
should be highly suspicious that it's good as is. Inline or rename. I vote
inline here.
##########
solr/core/src/test/org/apache/solr/search/facet/SpatialHeatmapFacetsTest.java:
##########
@@ -505,14 +502,15 @@ public void testJsonFacets() throws Exception {
private NamedList<?> getHmObj(QueryResponse response) {
// classic faceting
+ NamedList<Object> entries1 = response.getResponse();
final NamedList<?> classicResp =
- (NamedList<?>)
- response.getResponse().findRecursive("facet_counts",
"facet_heatmaps", FIELD);
+ (NamedList<?>) entries1._get(List.of("facet_counts", "facet_heatmaps",
FIELD), null);
if (classicResp != null) {
return classicResp;
}
// JSON Facet
- return (NamedList<?>) response.getResponse().findRecursive("facets", "f1");
+ NamedList<Object> entries = response.getResponse();
Review Comment:
inline
##########
solr/core/src/test/org/apache/solr/handler/admin/MetricsHandlerTest.java:
##########
@@ -689,7 +692,8 @@ public void testExprMetrics() throws Exception {
MetricsHandler.EXPR_PARAM,
key3),
resp);
- val = resp.getValues().findRecursive("metrics", "solr.core.collection1");
+ NamedList<Object> entries = resp.getValues();
Review Comment:
please inline
##########
solr/core/src/test/org/apache/solr/handler/admin/MetricsHandlerTest.java:
##########
@@ -655,7 +657,8 @@ public void testExprMetrics() throws Exception {
key2),
resp);
// response structure is like in the case of non-key params
- val = resp.getValues().findRecursive("metrics", "solr.core.collection1");
+ NamedList<Object> entries1 = resp.getValues();
Review Comment:
please inline entries1
##########
solr/core/src/test/org/apache/solr/search/facet/SpatialHeatmapFacetsTest.java:
##########
@@ -148,16 +148,13 @@ public void testClassicFacets() throws Exception { // AKA
SimpleFacets
+ FIELD);
final QueryResponse response = query(params);
assertEquals(6, getHmObj(response).get("gridLevel")); // same test as
above
+ NamedList<Object> entries1 = response.getResponse();
Review Comment:
inline
##########
solr/core/src/test/org/apache/solr/search/facet/SpatialHeatmapFacetsTest.java:
##########
@@ -148,16 +148,13 @@ public void testClassicFacets() throws Exception { // AKA
SimpleFacets
+ FIELD);
final QueryResponse response = query(params);
assertEquals(6, getHmObj(response).get("gridLevel")); // same test as
above
+ NamedList<Object> entries1 = response.getResponse();
assertEquals(
- 2,
- response
- .getResponse()
- .findRecursive("facet_counts", "facet_heatmaps", "course",
"gridLevel"));
+ 2, entries1._get(List.of("facet_counts", "facet_heatmaps", "course",
"gridLevel"), null));
+ NamedList<Object> entries = response.getResponse();
Review Comment:
inline
##########
solr/core/src/test/org/apache/solr/search/facet/SpatialHeatmapFacetsTest.java:
##########
@@ -505,14 +502,15 @@ public void testJsonFacets() throws Exception {
private NamedList<?> getHmObj(QueryResponse response) {
// classic faceting
+ NamedList<Object> entries1 = response.getResponse();
Review Comment:
inline
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]