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

Change New Suggester Response and minor cleanups

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 4.7, 6.0
    • None

    Description

      It would be nice to have a simplified response format for the new Suggester Component.
      The proposed format is as follows:
      XML:

      <?xml version="1.0" encoding="UTF-8"?>
      <response>
         <lst name="responseHeader">
            <int name="status">0</int>
            <int name="QTime">32</int>
         </lst>
         <str name="command">build</str>
         <lst name="suggest">
            <lst name="ele">
               <int name="numFound">1</int>
               <arr name="suggestions">
                  <lst>
                     <str name="term">electronics and computer1</str>
                     <long name="weight">2199</long>
                     <str name="payload" />
                  </lst>
               </arr>
            </lst>
         </lst>
      </response>
      

      JSON:

      {
          "responseHeader": {
              "status": 0,
              "QTime": 30
          },
          "command": "build",
          "suggest": {
              "ele": {
                  "numFound": 1,
                  "suggestions": [
                      {
                          "term": "electronics and computer1",
                          "weight": 2199,
                          "payload": ""
                      }
                  ]
              }
          }
      }
      

      Attachments

        1. SOLR-5528.patch
          34 kB
          Areek Zillur

        Issue Links

          Activity

            People

              Unassigned Unassigned
              areek Areek Zillur
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: