lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matt M." <goodie...@gmail.com>
Subject Re: Solr-ruby response structure inconsistent
Date Mon, 10 Mar 2008 20:42:39 GMT
I (and Erik) solved my problem! It was from a setting in the
solrconfig.xmlfile. Under the settings for the standard request. I
ended up copying the
schema from the acts_as_solr library, and didn't notice this one little
change:

<str name="json.nl">map</str>

That tells Solr to return the json result (or Ruby or Python) in a mapped
hash. Other types are available as well. More information on this can be
found here:

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

One thing that still seems to be a problem though. The sort order doesn't
seem to work correctly when using the "map" (hash) type. I solved this by
sorting the facet values result in in my Ruby code.

Thanks for your help Erik.

Matt

In context:
<requestHandler name="standard" class="solr.StandardRequestHandler">
  <lst name="defaults">
    <str name="echoParams">explicit</str>
    <str name="json.nl">map</str>


On Mon, Mar 10, 2008 at 12:35 PM, Matt M. <goodieboy@gmail.com> wrote:

> Just wanted to mention... the solr-ruby package has nothing to do with
> this. These are responses straight out of the solr/select handler.
>
> Matt
>
>
> On Mon, Mar 10, 2008 at 12:07 PM, Matt M. <goodieboy@gmail.com> wrote:
>
> > Hi,
> >
> > I've just noticed while switching connections between two different solr
> > instances (different servers) that their facet response structures are not
> > the same. But the Solr version is identical; 1.2. I've pasted in the
> > significant part of the response. Note the facet_fields in the first is a
> > Hash, but in the second, a simple list. Is there a known fix for this? I've
> > tried the stable solr-ruby gem and the trunk.
> >
> >
> > 'facet_fields'=>{'recording_format_facet'=>{'LP'=>220,'Cassette'=>87,'CD'=>1,''=>34685}}}}
> >
> > 'facet_fields'=>{'collection_facet'=>['UVa Library Text',5396,'Art and Architecture',4629,'UVa
Image Collection',4014,'Jackson Davis Collection',2996,'Chadwyk Healey Poetry',1771,'Chadwyk
Healey American Poetry',1288,nil,4422330]}}}
> >
> >
> > Thanks!
> > Matt
> >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message