lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jack L <>
Subject Re: facet.sort does not work in python output
Date Thu, 03 May 2007 23:43:45 GMT
The Python output uses nested dictionaries for facet counts.
I read it online that Python dictionaries do not preserve order.
So when a string is eval()'d, the sorted order is lost in the
generated Python object. Is it a good idea to use list to wrap
around the dictionary? This is only needed for the fields, sorted
by counts.

Best regards,

Wednesday, May 2, 2007, 6:09:50 PM, you wrote:

> When facet.sort is used, the facet fields are sorted by the count
> in the reply string when using python output. However, after calling
> eval(), the sort order seems to be lost. Not sure if anyone has come
> up with a way to avoid this problem.

> Using the JSON output with a JSON parser for Python should work but
> I haven't tested it yet.

View raw message