The output you showed is indeed incorrect, but I can't reproduce that
with stock solr.
Here is a example of what I get:

{
 'responseHeader'=>{
  'status'=>0,
  'QTime'=>16,
  'params'=>{
        'wt'=>'ruby',
        'indent'=>'true',
        'q'=>'*:*',
        'facet'=>'true',
        'highlight'=>'true'}},
 'response'=>{'numFound'=>0,'start'=>0,'docs'=>[]
 },
 'facet_counts'=>{
  'facet_queries'=>{},
  'facet_fields'=>{},
  'facet_dates'=>{}}}


-Yonik

On Wed, Mar 5, 2008 at 12:00 PM, Doug Steigerwald
<[EMAIL PROTECTED]> wrote:
> Sure.
>
>  The default (json.nl=flat):
>
>  'response',{'numFound'=>41,'start'=>0,............
>
>  Adding json.nl=map makes output correct:
>
>  'response'=>{'numFound'=>41,'start'=>0,............
>
>  This also changes facet output (which was evaluating fine):
>
>  FLAT:
>
>   'facet_counts',{
>    'facet_queries'=>{},
>    'facet_fields'=>{
>         'movies_movie_genre_facet'=>[
>          'Drama',22,
>          'Action/Adventure',11,
>          'Comedy',11,
>          'Suspense/Thriller',11,
>          'SciFi/Fantasy',5,
>          'Animation',4,
>          'Documentary',4,
>          'Family',3,
>          'Horror',3,
>          'Musical',2,
>          'Romance',2,
>          'Concert',1,
>          'War',1]},
>    'facet_dates'=>{}}
>
>  MAP:
>
>   'facet_counts'=>{
>    'facet_queries'=>{},
>    'facet_fields'=>{
>         'movies_movie_genre_facet'=>{
>          'Drama'=>22,
>          'Action/Adventure'=>11,
>          'Comedy'=>11,
>          'Suspense/Thriller'=>11,
>          'SciFi/Fantasy'=>5,
>          'Animation'=>4,
>          'Documentary'=>4,
>          'Family'=>3,
>          'Horror'=>3,
>          'Musical'=>2,
>          'Romance'=>2,
>          'Concert'=>1,
>          'War'=>1}},
>    'facet_dates'=>{}}
>
>  Doug
>
>
>
>  Yonik Seeley wrote:
>  > On Wed, Mar 5, 2008 at 11:25 AM, Doug Steigerwald
>  > <[EMAIL PROTECTED]> wrote:
>  >>  If you don't add the json.nl=map to your params, then you can't eval() 
> what you get back in Ruby
>  >>  ("can't convert String into Integer").
>  >
>  > Can you show what the problematic ruby output is?
>  >
>  > json.nl=map isn't the default because some things need to be ordered,
>  > and eval of a map in python & ruby looses that order.
>  >
>  > -Yonik
>

Reply via email to