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

Gus Heck commented on SOLR-12959:
---------------------------------

This is interesting and enlightening :) Some thoughts:

1) I don't get the phrase  "order is _secondary_ in importance." When I read 
that in the javadoc I'm not sure (based on that phrase) if order is required or 
if it can be sacrificed in some refactoring later. Looking around will answer 
the question, but the phrase muddies the water that would otherwise be clear 
(imho). Either order is required or it's not...

2) It sounds like the subclass is a solely rendering hint and intended to be 
otherwise identical. I think if we leave things as is, the javadoc should say 
THAT explicitly (assuming I got it right). 

3) It sounds like this *could* be a boolean flag on NamedList instead of a 
subclass? or if we want to leave open other implementations an enum? Maybe 
NamedList.Render with values ARRAY_1D and ARRAY_TUPLES (and perhaps some point 
ARRAY_2D or something else...) I'd also advocate staying away from the word 
"map" since the allowance of duplicate keys is extremely surprising for 
anything called a map
{code:java}
"features":[
        "adapter",2,
        "car",2,
        "power",2,
        "white",2]
 {code}
{code:java}
 "features":
      [
        {"adapter":2},
        {"car":2},
        {"power":2},
        {"white":2}]
{code}
I seearched for cases where we check "instanceof SimpleOrderedMap" and they all 
occur where we know we have a NamedList, so a boolean or enum attribute should 
work.

4) Finally, a question:  besides representing parameters from the GET request 
line, when do we handle/expect/use duplicate keys? Examples are not popping to 
mind...

> Deprecate solrj SimpleOrderedMap
> --------------------------------
>
>                 Key: SOLR-12959
>                 URL: https://issues.apache.org/jira/browse/SOLR-12959
>             Project: Solr
>          Issue Type: Improvement
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: SolrJ
>            Reporter: Noble Paul
>            Priority: Minor
>
> There is no difference between a NamedList and a  SumpleOrderedMap. It 
> doesn't help to have both of them when they are doing exactly free same things



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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

Reply via email to