You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Hoss Man (JIRA)" <ji...@apache.org> on 2015/03/10 00:46:38 UTC
[jira] [Commented] (SOLR-6682) EnumField + StatsComponent gives bad
toString() for min/max, probably doesn't work in distributed search ...
definitely needs more tests
[ https://issues.apache.org/jira/browse/SOLR-6682?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14353899#comment-14353899 ]
Hoss Man commented on SOLR-6682:
--------------------------------
I've folded the latest patch in this issue into the latest patch in SOLR-6349 and plan to commit them together. (the fix & tests here are key to ensuring the new functionality there work properly with EnumField -- but given other changes in Stats & tests on enum fields in that issue, i don't want to try and commit either issue independently.
> EnumField + StatsComponent gives bad toString() for min/max, probably doesn't work in distributed search ... definitely needs more tests
> ----------------------------------------------------------------------------------------------------------------------------------------
>
> Key: SOLR-6682
> URL: https://issues.apache.org/jira/browse/SOLR-6682
> Project: Solr
> Issue Type: Bug
> Reporter: Hoss Man
> Attachments: SOLR-6682.patch, SOLR-6682.patch
>
>
> when EnumField was added, support was included in StatsComponent for it (via the EnumStatsValues) but it doesn't seem to have ever had any tests written for it.
> doing some quick manual testing, it seems like the min/max values just wind up being the "toString()" value of the EnumFieldValue, so you get a response like this...
> {code}
> <lst name="stats">
> <lst name="stats_fields">
> <lst name="hoss">
> <str name="min">org.apache.solr.common.EnumFieldValue:Low</str>
> <str name="max">org.apache.solr.common.EnumFieldValue:High</str>
> <long name="count">2</long>
> <long name="missing">0</long>
> <lst name="facets"/></lst>
> </lst>
> </lst>
> {code}
> we should fix this to return just the stat label, and update the various StatsComponent tests to also cover enums & make sure it works as well as strings & numbers.
> notably: i'm fairly certain this EnumStatsValues class won't work at all in a distributed (stats) request.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org