You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "David Christianson (JIRA)" <ji...@apache.org> on 2012/12/17 00:44:12 UTC

[jira] [Comment Edited] (SOLR-1782) stats.facet assumes FieldCache.StringIndex - fails horribly on multivalued fields

    [ https://issues.apache.org/jira/browse/SOLR-1782?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13533566#comment-13533566 ] 

David Christianson edited comment on SOLR-1782 at 12/16/12 11:43 PM:
---------------------------------------------------------------------

I have a real need for this functionality and had been using the supplied patch on older distributions. However in more recent builds several classes changed and there was an exception added if you tried to write a stats query using a multivalued facet. So I've taken the code in the original patch and updated it for Solr 4.0, removing the exception and adding a couple of unit tests.
                
      was (Author: dchristianson):
    This patch is for Solr 4.0
                  
> stats.facet assumes FieldCache.StringIndex - fails horribly on multivalued fields
> ---------------------------------------------------------------------------------
>
>                 Key: SOLR-1782
>                 URL: https://issues.apache.org/jira/browse/SOLR-1782
>             Project: Solr
>          Issue Type: Bug
>          Components: search
>    Affects Versions: 1.4
>         Environment: reproduced on Win2k3 using 1.5.0-dev solr ($Id: CHANGES.txt 906924 2010-02-05 12:43:11Z noble $)
>            Reporter: Gerald DeConto
>         Attachments: index.rar, SOLR-1782.2.patch, SOLR-1782.patch, SOLR-1782.patch, SOLR-1782.test.patch
>
>
> the StatsComponent assumes any field specified in the stats.facet param can be faceted using FieldCache.DEFAULT.getStringIndex.  This can cause problems with a variety of field types, but in the case of multivalued fields it can either cause erroneous false stats when the number of distinct values is small, or it can cause ArrayIndexOutOfBoundsException when the number of distinct values is greater then the number of documents.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org