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

QueryElevationComponent does not handle escaped query terms

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 8.2
    • Fix Version/s: 8.7
    • Component/s: query parsers
    • Labels:

      Description

      Description

      if the elevate.xml contains a entry with spaces:

      <query text="aaa bbb"><doc id="core2docId2" /></query>

      and the Solr query term is escaped:

      ?q=aaa\+bbb

      the Solr search itself handels this correctly, but the elevate component "QueryElevationComponent" does not unescape the query term bevor the lookup in the elevate.xml.

      Result is that the entry is not elevated.

      A also valid (not escaped) query like:

      ?q=aaa%20bbb

      is working.

      Technical Notes

      see:
      org.apache.solr.handler.component.QueryElevationComponent.MapElevationProvider#getElevationForQuery

       

        Attachments

        1. SOLR-14782.patch
          5 kB
          Thomas Schmiereck

          Issue Links

            Activity

              People

              • Assignee:
                broustant Bruno Roustant
                Reporter:
                smk Thomas Schmiereck
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1.5h
                  1.5h