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

SignificantTermsQParserPlugin should output its keys in a combined bucket

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

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 7.4
    • Fix Version/s: 7.5
    • Component/s: query parsers
    • Labels:
      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

        Issue Links

          Activity

            People

            • Assignee:
              arafalov Alexandre Rafalovitch
              Reporter:
              arafalov Alexandre Rafalovitch

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment