: 
: how to parse json response from Solr Term Vector Component?
: 
: I got following json structure from response when testing Solr 5.3.0
: tvComponent:
        ... 
: Is it correct ? Why solr makes the json response for term vector
: information so difficult to extract from the client side ? why it use list
: to encode rather than dictionary?

What you're seeing has to do with how the general purpose datastructures 
used in the response are serialized into JSON. By default, solr's 
"NamedLIst" datastructure (which can support hte same key associated with 
multiple values) is modeled in JSON as a list of alternativing key value 
pairs for simplicity, but you can add a "json.nl=map" to force these to be 
a Map (in which case your parsing code has to decide what to do if/when a 
key is specified multiple times) or "json.nl=arrarr" (for an array of 
array pairs)

http://wiki.apache.org/solr/SolJSON#JSON_specific_parameters



-Hoss 
http://www.lucidworks.com/


Reply via email to