[
https://issues.apache.org/jira/browse/SOLR-1380?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12753622#action_12753622
]
Grant Ingersoll commented on SOLR-1380:
---------------------------------------
In looking a second time, what about the faceting support?
I think the test needs to pass something like (I didn't fill in the std. dev):
{noformat}
public void testMVFieldStatisticsResult() throws Exception {
SolrCore core = h.getCore();
assertU(adoc("id", "1", "stats_ii", "-10", "stats_ii", "-100", "active_s",
"true"));
assertU(adoc("id", "2", "stats_ii", "-20", "stats_ii", "200", "active_s",
"true"));
assertU(adoc("id", "3", "stats_ii", "-30", "stats_ii", "-1", "active_s",
"false"));
assertU(adoc("id", "4", "stats_ii", "-40", "stats_ii", "10", "active_s",
"false"));
assertU(commit());
Map<String, String> args = new HashMap<String, String>();
args.put(CommonParams.Q, "*:*");
args.put(StatsParams.STATS, "true");
args.put(StatsParams.STATS_FIELD, "stats_ii");
args.put(StatsParams.STATS_FACET, "active_s");
args.put("indent", "true");
SolrQueryRequest req = new LocalSolrQueryRequest(core, new
MapSolrParams(args));
assertQ("test statistics values", req
, "//doub...@name='min'][.='-100.0']"
, "//doub...@name='max'][.='200.0']"
, "//doub...@name='sum'][.='9.0']"
, "//lo...@name='count'][.='8']"
, "//lo...@name='missing'][.='0']"
, "//doub...@name='sumOfSquares'][.='53101.0']"
, "//doub...@name='mean'][.='1.125']"
, "//doub...@name='stddev'][.='87.08852228787508']"
);
assertQ("test value for active_s=true", req
, "//l...@name='true']/doub...@name='min'][.='-100.0']"
, "//l...@name='true']/doub...@name='max'][.='200.0']"
, "//l...@name='true']/doub...@name='sum'][.='130.0']"
, "//l...@name='true']/lo...@name='count'][.='2']"
, "//l...@name='true']/lo...@name='missing'][.='0']"
, "//l...@name='true']/doub...@name='sumOfSquares'][.='50500.0']"
, "//l...@name='true']/doub...@name='mean'][.='32.5']"
, "//l...@name='true']/doub...@name='stddev'][.='']"
);
}
{noformat}
If you can turn this around pretty quick, I think we can still add it,
otherwise I'm going to mark as 1.5
> Extend StatsComponent to MultiValued Fields
> -------------------------------------------
>
> Key: SOLR-1380
> URL: https://issues.apache.org/jira/browse/SOLR-1380
> Project: Solr
> Issue Type: Improvement
> Components: search
> Affects Versions: 1.4
> Reporter: Harish Agarwal
> Assignee: Grant Ingersoll
> Priority: Minor
> Fix For: 1.4
>
> Attachments: SOLR-1380.patch, SOLR-1380.patch, SOLR-1380.patch
>
> Original Estimate: 0h
> Remaining Estimate: 0h
>
> The StatsComponent does not work on multivalued fields.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.