You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Peter McPeterson <gi...@hotmail.com> on 2007/02/27 23:24:29 UTC

Bug on the 'facet_fields' response format???

Hi all,

Was there an intended change on the 'facet_fields' response from Solr's 
ruby/python format on the nightly build? Before it was returning a hash but 
now it's returning an array. I'm assuming it's a bug...

before:
'facet_fields'=>{'category'=>{'TVs' => 2, 'Electronics' => 1}}

after
'facet_fields'=>{'category'=>['TVs',2,'Electronics',1]}

Thanks

_________________________________________________________________
Don’t miss your chance to WIN 10 hours of private jet travel from MicrosoftŽ 
Office Live http://clk.atdmt.com/MRT/go/mcrssaub0540002499mrt/direct/01/


Re: Bug on the 'facet_fields' response format???

Posted by Yonik Seeley <yo...@apache.org>.
On 2/27/07, Peter McPeterson <gi...@hotmail.com> wrote:
> Was there an intended change on the 'facet_fields' response from Solr's
> ruby/python format on the nightly build? Before it was returning a hash but
> now it's returning an array. I'm assuming it's a bug...

It was decided that too many clients couldn't maintain order (because
of mapping to unordered native maps/hashes).

See
http://svn.apache.org/viewvc/lucene/solr/trunk/CHANGES.txt?view=markup

'''The JSON response format for facets has changed to make it easier for
clients to retain sorted order.  Use json.nl=map explicitly in clients
to get the old behavior, or add it as a default to the request handler
in solrconfig.xml'''

or

http://wiki.apache.org/solr/SolJSON
where it explains that json.nl.flat is now the default.

-Yonik

Re: Bug on the 'facet_fields' response format???

Posted by Chris Hostetter <ho...@fucit.org>.
: Was there an intended change on the 'facet_fields' response from Solr's
: ruby/python format on the nightly build? Before it was returning a hash but
: now it's returning an array. I'm assuming it's a bug...

when upgrading Solr, it's always good to check the CHANGES.txt file --
even when using nightly builds, diffing them can tell you what's diferent.

this was added recently...

The JSON response format for facets has changed to make it easier for
clients to retain sorted order.  Use json.nl=map explicitly in clients
to get the old behavior, or add it as a default to the request handler
in solrconfig.xml



-Hoss