Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-8228 Facet Telemetry
  3. SOLR-8230

Create Facet Telemetry for Nested Facet Query

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 5.5, 6.0
    • Facet Module
    • None

    Description

      This is the first step for SOLR-8228 Facet Telemetry. It's going to implement the telemetry for a nested facet query and put the information obtained in debug field in response.

      Here is an example of telemetry returned from query.
      Query

      curl http://localhost:8228/solr/films/select -d 'q=*:*&wt=json&indent=true&debugQuery=true&json.facet={
      top_genre: {
        type:terms,
        field:genre,
        numBucket:true,
        limit:2,
        facet: {
          top_director: {
              type:terms,
              field:directed_by,
              numBuckets:true,
              limit:2
          },
          first_release: {
              type:terms,
              field:initial_release_date,
              sort:{index:asc},
              numBuckets:true,
              limit:2
          }
        }
      }
      }'
      

      Telemetry returned (inside debug part)

          "facet-trace":{
            "processor":"FacetQueryProcessor",
            "elapse":1,
            "query":null,
            "sub-facet":[{
                "processor":"FacetFieldProcessorUIF",
                "elapse":1,
                "field":"genre",
                "limit":2,
                "sub-facet":[{
                    "filter":"genre:Drama",
                    "processor":"FacetFieldProcessorUIF",
                    "elapse":0,
                    "field":"directed_by",
                    "limit":2},
                  {
                    "filter":"genre:Drama",
                    "processor":"FacetFieldProcessorNumeric",
                    "elapse":0,
                    "field":"initial_release_date",
                    "limit":2},
                  {
                    "filter":"genre:Comedy",
                    "processor":"FacetFieldProcessorUIF",
                    "elapse":0,
                    "field":"directed_by",
                    "limit":2},
                  {
                    "filter":"genre:Comedy",
                    "processor":"FacetFieldProcessorNumeric",
                    "elapse":0,
                    "field":"initial_release_date",
                    "limit":2}]}]},
      

      Attachments

        1. SOLR-8230.patch
          13 kB
          Michael Sun
        2. SOLR-8230.patch
          14 kB
          Michael Sun
        3. SOLR-8230.patch
          13 kB
          Michael Sun
        4. SOLR-8230.patch
          13 kB
          Michael Sun
        5. SOLR-8230.patch
          13 kB
          Michael Sun

        Activity

          People

            Unassigned Unassigned
            michael.sun Michael Sun
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: