You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by "Max Schöfmann (JIRA)" <ji...@apache.org> on 2009/05/06 15:24:30 UTC
[jira] Created: (SOLR-1148) with code generated by the RubyWriter
sorted facets are are actually unsorted in Ruby 1.8
with code generated by the RubyWriter sorted facets are are actually unsorted in Ruby 1.8
-----------------------------------------------------------------------------------------
Key: SOLR-1148
URL: https://issues.apache.org/jira/browse/SOLR-1148
Project: Solr
Issue Type: Bug
Components: clients - ruby - flare
Affects Versions: 1.3
Reporter: Max Schöfmann
Priority: Minor
Facet counts are returned as ruby Hash, which is unordered in Ruby 1.8. After evaling the hash, the sorting order is lost and the client program needs to re-sort the data.
A fix would be returning facet counts as array of pairs, instead, e.g.
[['foo', 10], ['bar', 8], ['baz', 6]]
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (SOLR-1148) with code generated by the RubyWriter
sorted facets are are actually unsorted in Ruby 1.8
Posted by "Yonik Seeley (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-1148?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12706435#action_12706435 ]
Yonik Seeley commented on SOLR-1148:
------------------------------------
Are you passing a parameter that is causing Solr to return a hash? The default for JSON/Python/Ruby is to return an array when order is important.
http://localhost:8983/solr/select?q=*:*&facet=on&facet.field=cat&wt=ruby&indent=on
{code}
'facet_fields'=>{
'cat'=>[
'electronics',14,
'memory',3,
'card',2,
'connector',2,
'drive',2,
'graphics',2,
'hard',2,
'monitor',2,
'search',2,
'software',2,
'camera',1,
'copier',1,
'multifunction',1,
'music',1,
'printer',1,
'scanner',1]},
{code}
> with code generated by the RubyWriter sorted facets are are actually unsorted in Ruby 1.8
> -----------------------------------------------------------------------------------------
>
> Key: SOLR-1148
> URL: https://issues.apache.org/jira/browse/SOLR-1148
> Project: Solr
> Issue Type: Bug
> Components: clients - ruby - flare
> Affects Versions: 1.3
> Reporter: Max Schöfmann
> Priority: Minor
>
> Facet counts are returned as ruby Hash, which is unordered in Ruby 1.8. After evaling the hash, the sorting order is lost and the client program needs to re-sort the data.
> A fix would be returning facet counts as array of pairs, instead, e.g.
> [['foo', 10], ['bar', 8], ['baz', 6]]
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (SOLR-1148) with code generated by the RubyWriter
sorted facets are are actually unsorted in Ruby 1.8
Posted by "Yonik Seeley (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-1148?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Yonik Seeley resolved SOLR-1148.
--------------------------------
Resolution: Cannot Reproduce
> with code generated by the RubyWriter sorted facets are are actually unsorted in Ruby 1.8
> -----------------------------------------------------------------------------------------
>
> Key: SOLR-1148
> URL: https://issues.apache.org/jira/browse/SOLR-1148
> Project: Solr
> Issue Type: Bug
> Components: clients - ruby - flare
> Affects Versions: 1.3
> Reporter: Max Schöfmann
> Priority: Minor
>
> Facet counts are returned as ruby Hash, which is unordered in Ruby 1.8. After evaling the hash, the sorting order is lost and the client program needs to re-sort the data.
> A fix would be returning facet counts as array of pairs, instead, e.g.
> [['foo', 10], ['bar', 8], ['baz', 6]]
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (SOLR-1148) with code generated by the RubyWriter
sorted facets are are actually unsorted in Ruby 1.8
Posted by "Max Schöfmann (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-1148?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12706456#action_12706456 ]
Max Schöfmann commented on SOLR-1148:
-------------------------------------
Ah, my solrconfig.xml had indeed the json.nl parameter overridden to "map". Seems to be a bug in the bundled config of the popular rails plugin for solr.
Sorry for the noise.
> with code generated by the RubyWriter sorted facets are are actually unsorted in Ruby 1.8
> -----------------------------------------------------------------------------------------
>
> Key: SOLR-1148
> URL: https://issues.apache.org/jira/browse/SOLR-1148
> Project: Solr
> Issue Type: Bug
> Components: clients - ruby - flare
> Affects Versions: 1.3
> Reporter: Max Schöfmann
> Priority: Minor
>
> Facet counts are returned as ruby Hash, which is unordered in Ruby 1.8. After evaling the hash, the sorting order is lost and the client program needs to re-sort the data.
> A fix would be returning facet counts as array of pairs, instead, e.g.
> [['foo', 10], ['bar', 8], ['baz', 6]]
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (SOLR-1148) with code generated by the RubyWriter
sorted facets are are actually unsorted in Ruby 1.8
Posted by "Erik Hatcher (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-1148?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12706468#action_12706468 ]
Erik Hatcher commented on SOLR-1148:
------------------------------------
Which rails plugin has json.nl set to "map"?
> with code generated by the RubyWriter sorted facets are are actually unsorted in Ruby 1.8
> -----------------------------------------------------------------------------------------
>
> Key: SOLR-1148
> URL: https://issues.apache.org/jira/browse/SOLR-1148
> Project: Solr
> Issue Type: Bug
> Components: clients - ruby - flare
> Affects Versions: 1.3
> Reporter: Max Schöfmann
> Priority: Minor
>
> Facet counts are returned as ruby Hash, which is unordered in Ruby 1.8. After evaling the hash, the sorting order is lost and the client program needs to re-sort the data.
> A fix would be returning facet counts as array of pairs, instead, e.g.
> [['foo', 10], ['bar', 8], ['baz', 6]]
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (SOLR-1148) with code generated by the RubyWriter
sorted facets are are actually unsorted in Ruby 1.8
Posted by "Max Schöfmann (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-1148?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Max Schöfmann closed SOLR-1148.
-------------------------------
> with code generated by the RubyWriter sorted facets are are actually unsorted in Ruby 1.8
> -----------------------------------------------------------------------------------------
>
> Key: SOLR-1148
> URL: https://issues.apache.org/jira/browse/SOLR-1148
> Project: Solr
> Issue Type: Bug
> Components: clients - ruby - flare
> Affects Versions: 1.3
> Reporter: Max Schöfmann
> Priority: Minor
>
> Facet counts are returned as ruby Hash, which is unordered in Ruby 1.8. After evaling the hash, the sorting order is lost and the client program needs to re-sort the data.
> A fix would be returning facet counts as array of pairs, instead, e.g.
> [['foo', 10], ['bar', 8], ['baz', 6]]
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (SOLR-1148) with code generated by the RubyWriter
sorted facets are are actually unsorted in Ruby 1.8
Posted by "Erik Hatcher (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-1148?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12706441#action_12706441 ]
Erik Hatcher commented on SOLR-1148:
------------------------------------
Also of note... if you're using the solr-ruby library, the Standard response has a #field_facets(field_name) method that'll give you back properly sorted facets (from the array Yonik demonstrated) as a nicer to work with data structure: and array of FacetValue (a Ruby Struct) objects.
> with code generated by the RubyWriter sorted facets are are actually unsorted in Ruby 1.8
> -----------------------------------------------------------------------------------------
>
> Key: SOLR-1148
> URL: https://issues.apache.org/jira/browse/SOLR-1148
> Project: Solr
> Issue Type: Bug
> Components: clients - ruby - flare
> Affects Versions: 1.3
> Reporter: Max Schöfmann
> Priority: Minor
>
> Facet counts are returned as ruby Hash, which is unordered in Ruby 1.8. After evaling the hash, the sorting order is lost and the client program needs to re-sort the data.
> A fix would be returning facet counts as array of pairs, instead, e.g.
> [['foo', 10], ['bar', 8], ['baz', 6]]
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (SOLR-1148) with code generated by the RubyWriter
sorted facets are are actually unsorted in Ruby 1.8
Posted by "Max Schöfmann (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-1148?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12706486#action_12706486 ]
Max Schöfmann commented on SOLR-1148:
-------------------------------------
acts_as_solr -- still seems to be quite popular (thanks to github...)
fixed this in my own fork: http://github.com/schoefmax/acts_as_solr
> with code generated by the RubyWriter sorted facets are are actually unsorted in Ruby 1.8
> -----------------------------------------------------------------------------------------
>
> Key: SOLR-1148
> URL: https://issues.apache.org/jira/browse/SOLR-1148
> Project: Solr
> Issue Type: Bug
> Components: clients - ruby - flare
> Affects Versions: 1.3
> Reporter: Max Schöfmann
> Priority: Minor
>
> Facet counts are returned as ruby Hash, which is unordered in Ruby 1.8. After evaling the hash, the sorting order is lost and the client program needs to re-sort the data.
> A fix would be returning facet counts as array of pairs, instead, e.g.
> [['foo', 10], ['bar', 8], ['baz', 6]]
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.