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

Facet search count numbers are falsified by older document versions when multi-select is used

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 5.4
    • 5.5, 6.0
    • None
    • None

    Description

      Our setup is based on multiple cores. In One core we have a multi-filed with integer values. and some other unimportant fields. We're using multi-faceting for this field.

      We're querying a test scenario with:

      http://localhost:8983/solr/core-name/select?q=dummyask: (true) AND manufacturer: false AND id: (15039 16882 10850 20781)&fq={!tag=professions}professions: (59)&fl=id&wt=json&indent=true&facet=true&facet.field={!ex=professions}professions
      
      • Query: (numDocs:48545, maxDoc:48545)
        <response>
        <lst name="responseHeader">
        <int name="status">0</int>
        <int name="QTime">1</int>
        </lst>
        <result name="response" numFound="4" start="0">
        <doc>
        <int name="id">10850</int>
        </doc>
        <doc>
        <int name="id">16882</int>
        </doc>
        <doc>
        <int name="id">15039</int>
        </doc>
        <doc>
        <int name="id">20781</int>
        </doc>
        </result>
        <lst name="facet_counts">
        <lst name="facet_queries"/>
        <lst name="facet_fields">
        <lst name="professions">
        <int name="59">4</int>
        </lst>
        </lst>
        <lst name="facet_dates"/>
        <lst name="facet_ranges"/>
        <lst name="facet_intervals"/>
        <lst name="facet_heatmaps"/>
        </lst>
        </response>
        
      • Then we update one document and change some fields (numDocs:48545, maxDoc:48546) The number of maxDocs is increased
        <response>
        <lst name="responseHeader">
        <int name="status">0</int>
        <int name="QTime">1</int>
        </lst>
        <result name="response" numFound="4" start="0">
        <doc>
        <int name="id">10850</int>
        </doc>
        <doc>
        <int name="id">16882</int>
        </doc>
        <doc>
        <int name="id">15039</int>
        </doc>
        <doc>
        <int name="id">20781</int>
        </doc>
        </result>
        <lst name="facet_counts">
        <lst name="facet_queries"/>
        <lst name="facet_fields">
        <lst name="professions">
        <int name="59">5</int>
        </lst>
        </lst>
        <lst name="facet_dates"/>
        <lst name="facet_ranges"/>
        <lst name="facet_intervals"/>
        <lst name="facet_heatmaps"/>
        </lst>
        </response>
        

      The Problem:
      In the first query, we're getting a facet count of 4, which is correct. After updating one document, we're getting 5 as a result wich is not correct.

      Attachments

        1. SOLR-8496.patch
          6 kB
          Yonik Seeley

        Issue Links

          Activity

            People

              yseeley@gmail.com Yonik Seeley
              amueller2504 Andreas Müller
              Votes:
              0 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: