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

json.facets: method:stream is incompatible with allBuckets:true

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 8.8
    • Component/s: Facet Module
    • Labels:
      None

      Description

      FacetFieldProcessorByEnumTermsStream has never supported allBuckets:true but it also doesn't fail outright if allBuckets:true is specified – instead the bucket is silently missing from the response.

      Given how the method option is only used as a suggestion, and the actuall processor can change based on hueristics about the request, this means that the behavior of combining allBuckets:true with method:stream can vary depending on the other options specified – notably the sort

      % curl -sS -X POST http://localhost:8983/solr/techproducts/query -d 'omitHeader=true&rows=0&q=*:*&json.facet={
        x : {
          type : terms,
          method: stream,
          field : manu_id_s,
          allBuckets : true,
          limit : 2,
          } }'
          
      {
        "response":{"numFound":32,"start":0,"docs":[]
        },
        "facets":{
          "count":32,
          "x":{
            "allBuckets":{
              "count":18},
            "buckets":[{
                "val":"corsair",
                "count":3},
              {
                "val":"belkin",
                "count":2}]}}}
      
      
      % curl -sS -X POST http://localhost:8983/solr/techproducts/query -d 'omitHeader=true&rows=0&q=*:*&json.facet={
        x : {
          type : terms,
          method: stream,
          field : manu_id_s,
          allBuckets : true,
          limit : 2,
          sort: "index asc"
          } }'
      
      {
        "response":{"numFound":32,"start":0,"docs":[]
        },
        "facets":{
          "count":32,
          "x":{
            "buckets":[{
                "val":"apple",
                "count":1},
              {
                "val":"asus",
                "count":1}]}}}
      

        Attachments

        Issue Links

          Activity

            People

            • Assignee:
              munendrasn Munendra S N
              Reporter:
              hossman Chris M. Hostetter

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment