lucene-solr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Grant Ingersoll (JIRA)" <j...@apache.org>
Subject [jira] Commented: (SOLR-1380) Extend StatsComponent to MultiValued Fields
Date Thu, 10 Sep 2009 13:46:57 GMT

    [ 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
            , "//double[@name='min'][.='-100.0']"
            , "//double[@name='max'][.='200.0']"
            , "//double[@name='sum'][.='9.0']"
            , "//long[@name='count'][.='8']"
            , "//long[@name='missing'][.='0']"
            , "//double[@name='sumOfSquares'][.='53101.0']"
            , "//double[@name='mean'][.='1.125']"
            , "//double[@name='stddev'][.='87.08852228787508']"
    );

    assertQ("test value for active_s=true", req
            , "//lst[@name='true']/double[@name='min'][.='-100.0']"
            , "//lst[@name='true']/double[@name='max'][.='200.0']"
            , "//lst[@name='true']/double[@name='sum'][.='130.0']"
            , "//lst[@name='true']/long[@name='count'][.='2']"
            , "//lst[@name='true']/long[@name='missing'][.='0']"
            , "//lst[@name='true']/double[@name='sumOfSquares'][.='50500.0']"
            , "//lst[@name='true']/double[@name='mean'][.='32.5']"
            , "//lst[@name='true']/double[@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.


Mime
View raw message