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

JSON terms facet counts change when changing limit parameter

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 5.5.2
    • None
    • Facet Module
    • None

    Description

      We are running a single node Solr 5.5.2. When querying for facets via the json facets api, the count for the buckets changes when the limit parameter of the requested terms facet is edited.
      The field we facet over is a multivalued keyword field:

      <fieldType name="text_keyword" class="solr.TextField">
         <analyzer>
            <tokenizer class="solr.KeywordTokenizerFactory" />
         </analyzer>
      </fieldType>
      
      <dynamicField name="*_KEY_MULTI" type="text_keyword" indexed="true" stored="true" termVectors="false"	multiValued="true" />
      

      The queries that produce the different results are:
      facet.limit=10

      {
         "params": {
            "start": 0,
            "rows": 0
         },
         "facet": {
            "nerPersonFacet": {
               "field": "KLAS_NAME_10045_KEY_MULTI",
               "limit": 10,
               "type": "terms"
            }
         }
      }
      

      Result:

      :   "facets":
      :   {
      :   :   "count":26588990,
      :   :   "nerPersonFacet":
      :   :   {
      :   :   :   "buckets":
      :   :   :   [
      :   :   :   :   {
      :   :   :   :   :   "val":"Angela Merkel",
      :   :   :   :   :   "count":32179
      :   :   :   :   },
      :   :   :   :   {
      :   :   :   :   :   "val":"Donald Trump",
      :   :   :   :   :   "count":30418
      :   :   :   :   },
      :   :   :   :   {
      :   :   :   :   :   "val":"Hillary Clinton",
      :   :   :   :   :   "count":30305
      :   :   :   :   },
      :   :   :   :   {
      :   :   :   :   :   "val":"Barack Obama",
      :   :   :   :   :   "count":25683
      :   :   :   :   },
      :   :   :   :   {
      :   :   :   :   :   "val":"Pope Francis",
      :   :   :   :   :   "count":22323
      :   :   :   :   },
      

      facet.limit=15

      {
         "params": {
            "start": 0,
            "rows": 0
         },
         "facet": {
            "nerPersonFacet": {
               "field": "KLAS_NAME_10045_KEY_MULTI",
               "limit": 15,
               "type": "terms"
            }
         }
      }
      

      Results:

      :   "facets":
      :   {
      :   :   "count":26588990,
      :   :   "nerPersonFacet":
      :   :   {
      :   :   :   "buckets":
      :   :   :   [
      :   :   :   :   {
      :   :   :   :   :   "val":"Angela Merkel",
      :   :   :   :   :   "count":32179
      :   :   :   :   },
      :   :   :   :   {
      :   :   :   :   :   "val":"Barack Obama",
      :   :   :   :   :   "count":30922
      :   :   :   :   },
      :   :   :   :   {
      :   :   :   :   :   "val":"Donald Trump",
      :   :   :   :   :   "count":30418
      :   :   :   :   },
      :   :   :   :   {
      :   :   :   :   :   "val":"Hillary Clinton",
      :   :   :   :   :   "count":30305
      :   :   :   :   },
      :   :   :   :   {
      :   :   :   :   :   "val":"Pope Francis",
      :   :   :   :   :   "count":22323
      :   :   :   :   },
      

      The count for the bucket "Barack Obama" changes significantly from 25683 to 30922. When querying for KLAS_NAME_10045_KEY_MULTI:"Barack Obama" the count is 30922.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              defonion def onion
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: