mkhludnev commented on a change in pull request #1122: SOLR-12490 Added parsing 
of json.queries for referring in JSON facets
URL: https://github.com/apache/lucene-solr/pull/1122#discussion_r361401011
 
 

 ##########
 File path: solr/core/src/java/org/apache/solr/request/json/RequestUtil.java
 ##########
 @@ -214,48 +215,60 @@ public static void processParams(SolrRequestHandler 
handler, SolrQueryRequest re
           out = "rows";
         } else if (SORT.equals(key)) {
           out = SORT;
+        } else if ("queries".equals(key)) {
+          Object queriesJsonObj = entry.getValue();
+          if (queriesJsonObj instanceof Map) {
+            for (Map.Entry<String, Object> queryJsonProperty : ((Map<String, 
Object>) queriesJsonObj).entrySet()) {
+              out = queryJsonProperty.getKey();
+              arr = true;
+              isQuery = true;
+              convertJsonPropertyToLocalParams(newMap, jsonQueryConverter, 
queryJsonProperty, out, isQuery, arr);
+            }
+            continue;
+          } else {
+           throw new SolrException(SolrException.ErrorCode.BAD_REQUEST, 
"Expected Map for 'queries', received " + 
queriesJsonObj.getClass().getSimpleName() + "=" + queriesJsonObj);
 
 Review comment:
   not Map. but Object for json.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to