Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-1782

stats.facet assumes FieldCache.StringIndex - fails horribly on multivalued fields

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 1.4
    • Fix Version/s: 5.0
    • Component/s: search
    • Labels:
      None
    • Environment:

      reproduced on Win2k3 using 1.5.0-dev solr ($Id: CHANGES.txt 906924 2010-02-05 12:43:11Z noble $)

      Description

      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.

      New users interested in mixing stats & facets are encouraged to ignore the stats.facet param and instead combine stats.field with facet.pivot to achieve similar results more efficiently...

      https://cwiki.apache.org/confluence/display/solr/The+Stats+Component#TheStatsComponent-TheStatsComponentandFaceting

        Attachments

        1. SOLR-1782.test.patch
          5 kB
          Hoss Man
        2. SOLR-1782.solr-4.2.1.patch
          21 kB
          Patanachai Tangchaisin
        3. SOLR-1782.patch
          12 kB
          Wojtek Piaseczny
        4. SOLR-1782.patch
          15 kB
          David Christianson
        5. SOLR-1782.patch
          21 kB
          Hoss Man
        6. SOLR-1782.2013-04-10.patch
          21 kB
          Steven Bower
        7. SOLR-1782.2013-01-07.patch
          16 kB
          David Christianson
        8. SOLR-1782.2.patch
          12 kB
          Wojtek Piaseczny
        9. index.rar
          83 kB
          Gerald DeConto

          Issue Links

            Activity

              People

              • Assignee:
                hossman Hoss Man
                Reporter:
                gdeconto Gerald DeConto
              • Votes:
                9 Vote for this issue
                Watchers:
                16 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: