You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Erick Erickson (JIRA)" <ji...@apache.org> on 2014/03/13 14:47:44 UTC
[jira] [Assigned] (SOLR-5857) StatsComponent returns invalid string
representation in facets
[ https://issues.apache.org/jira/browse/SOLR-5857?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Erick Erickson reassigned SOLR-5857:
------------------------------------
Assignee: Erick Erickson
> StatsComponent returns invalid string representation in facets
> --------------------------------------------------------------
>
> Key: SOLR-5857
> URL: https://issues.apache.org/jira/browse/SOLR-5857
> Project: Solr
> Issue Type: Bug
> Reporter: Elran Dvir
> Assignee: Erick Erickson
> Attachments: SOLR-5857.patch
>
>
> I have an EnumField called severity.
> When I run the following query:
> rows=0&q=*:*&fq=(severity:Critical OR severity:High)&fq=fieldB:[* TO *]&fq=severity:[* TO *]&stats=true&stats.field=fieldB&f.fieldB.stats.facet=severity
> I get the following response:
> <result name="response" numFound="1786" start="0"/>
> <lst name="stats">
> <lst name="stats_fields">
> <lst name="fieldB">
> <str name="min">Bej</str>
> <str name="max">dmfbsrvftu</str>
> <long name="count">1786</long>
> <long name="missing">0</long>
> <lst name="facets">
> <lst name="severity">
> <lst name="`#8;#0;#0;#0;#5;">
> <str name="min">Cfo Qbsbejtf )cfoq@be/difdlqpjou/dpn*!</str>
> <str name="max">Tiblfe Evobz )tiblfee*!</str>
> <long name="count">24</long>
> <long name="missing">0</long>
> <lst name="facets"/>
> </lst>
> <lst name="`#8;#0;#0;#0;#4;">
> <str name="min">Bej Cbcbj )bejc*!</str>
> <str name="max">dmfbsrvftu</str>
> <long name="count">1762</long>
> <long name="missing">0</long>
> <lst name="facets"/>
> </lst>
> </lst>
> </lst>
> </lst>
> </lst>
> </lst>
>
> As can be seen, the string representation of severity is invalid
> So I concluded there is a bug with displaying statscomponent facet value.
> I attached a patch fixing the bug. It now returns the proper string representation of the term.
> I think StatsComponent facet value should be the Object itself and not the string representation, similar to all other stats values.
> (For example, If it's an object, the facet field values can be sorted in case the field is a Number or EnumField)
> I tried to change it, but statscomponent facet value is FieldStatsInfo's name and it gets it from NamedList element's name.
> If someone can take a look and fix it, I think it will be great.
> Thanks.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org