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

SignificantTermsQParserPlugin should output its keys in a combined bucket

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 7.4
    • 7.5
    • query parsers
    • None

    Description

      SignificantTermsQParserPlugin is not yet visible to the users (was not documented or spelt correctly in 7.4), so there is still a chance to fix its output before people start using it.

      Currently, it injects 6 different keys into the document, on the same level as responseHeader and response. This feels like polluting top-level space. It may be better to put all those keys under one bucket (e.g. significantTerms). Additionally, resultCount is always the same as response.numFound (documents found), so does not seem to be needed.

      Current output:

      {
          "responseHeader": {
              "status": 0,
              "QTime": 1,
              "params": {
                  "q": "directed_by_str:\"Steven Soderbergh\"",
                  "fq": "{!significantTerms field=genre numTerms=2}",
                  "rows": "1",
                  "wt": "json"
              }
          },
          "numDocs": 1100,
          "resultCount": 5,
          "sterms": [
              "biographical",
              "romance"
          ],
          "scores": [
              2.5552773475646973,
              2.6387078762054443
          ],
          "docFreq": [
              74,
              270
          ],
          "queryDocFreq": [
              2,
              3
          ],
          "response": {
              "numFound": 5,
              "start": 0,
              "docs": [
                  {
                      "id": "/en/bubble",
                      "directed_by": [
                          "Steven Soderbergh"
                      ],
                      "initial_release_date": "2005-09-03T00:00:00Z",
                      "name": "Bubble",
                      "genre": [
                          "Crime Fiction",
                          "Mystery",
                          "Indie film",
                          "Thriller",
                          "Drama"
                      ],
                      "_version_": 1606610059993808899
                  }
              ]
          }
      }

      Attachments

        1. SOLR-12574.patch
          2 kB
          Alexandre Rafalovitch

        Issue Links

          Activity

            People

              arafalov Alexandre Rafalovitch
              arafalov Alexandre Rafalovitch
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: