[ 
https://issues.apache.org/jira/browse/SOLR-12325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17052324#comment-17052324
 ] 

Munendra S N commented on SOLR-12325:
-------------------------------------

+1 to adding additional test
Few nitpicks 
* Remove any usage of System.out.* in the patch
* matchPart has bug, as it returns on the if both the keys match. Also, instead 
of returning just {{err}}, I think it would be better if we include the key for 
which compare failed

{code:java}
for (String key: keys) {
        if ( (((Map) inputObj2).get(key)).equals(((Map) inputObj1).get(key))) {
          return null; // the culprit
        } else {
          return "err";
        }
      }
{code}

* Also, do we need logging in {{matchTwoJSONs}} as already we are throwing 
exception? If log is for some purpose then, we can keep else, we can avoid it. 
Method would be cleaner without failed flags

[~mkhl] should we close this as branch_8_5 is cut from master?

> introduce uniqueBlockQuery(parent:true) aggregation for JSON Facet
> ------------------------------------------------------------------
>
>                 Key: SOLR-12325
>                 URL: https://issues.apache.org/jira/browse/SOLR-12325
>             Project: Solr
>          Issue Type: New Feature
>          Components: Facet Module
>            Reporter: Mikhail Khludnev
>            Assignee: Mikhail Khludnev
>            Priority: Major
>             Fix For: 8.5
>
>         Attachments: SOLR-12325.patch, SOLR-12325.patch, SOLR-12325.patch, 
> SOLR-12325.patch, SOLR-12325.patch, 
> SOLR-12325_Random_test_for_uniqueBlockQuery (1).patch
>
>          Time Spent: 1.5h
>  Remaining Estimate: 0h
>
> It might be faster twin for {{uniqueBlock(\_root_)}}. Please utilise buildin 
> query parsing method, don't invent your own. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to