Solr
  1. Solr
  2. SOLR-3467

ExtendedDismax escaping is missing several reserved characters

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 3.6
    • Fix Version/s: 4.0-BETA, 5.0
    • Component/s: query parsers
    • Labels:
      None

      Description

      When edismax is unable to parse the original user query, it retries using an escaped version of that query (where all reserved chars have been escaped).

      Currently, the escaping done in splitIntoClauses appears to be missing several chars from QueryParserBase#escape(String), namely '
      ', '|', '&', '/'

      1. SOLR-3467-lucene_solr_3_6.patch
        3 kB
        Jan Høydahl
      2. SOLR-3467.patch
        0.6 kB
        Michael Dodsworth
      3. SOLR-3467.patch
        2 kB
        Michael Dodsworth
      4. SOLR-3467.patch
        3 kB
        Jan Høydahl
      5. SOLR-3467.patch
        8 kB
        Jan Høydahl

        Issue Links

          Activity

          Uwe Schindler made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Hoss Man made changes -
          Fix Version/s 4.0 [ 12322455 ]
          Fix Version/s 4.0-ALPHA [ 12314992 ]
          Hide
          Hoss Man added a comment -

          hoss20120711-manual-post-40alpha-change

          Show
          Hoss Man added a comment - hoss20120711-manual-post-40alpha-change
          Hide
          Michael Dodsworth added a comment -

          much appreciated, Jan. Thank you.

          Show
          Michael Dodsworth added a comment - much appreciated, Jan. Thank you.
          Jan Høydahl made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Hide
          Jan Høydahl added a comment -

          Checked in to trunk and 4.x

          Show
          Jan Høydahl added a comment - Checked in to trunk and 4.x
          Jan Høydahl made changes -
          Fix Version/s 3.6.1 [ 12320754 ]
          Jan Høydahl made changes -
          Attachment SOLR-3467.patch [ 12533787 ]
          Hide
          Jan Høydahl added a comment -

          New patch which also uncomments partialEscape() which is dead code

          Show
          Jan Høydahl added a comment - New patch which also uncomments partialEscape() which is dead code
          Hide
          Jan Høydahl added a comment -

          Yea, I see that. Actually, I cannot get the test to fail, even with 3.6.0 - is there a better way to trigger the missing escaping of particularly '&', '
          ' and '|' ? If not, then I cannot see a need for a 3.6.x patch.

          Show
          Jan Høydahl added a comment - Yea, I see that. Actually, I cannot get the test to fail, even with 3.6.0 - is there a better way to trigger the missing escaping of particularly '&', ' ' and '|' ? If not, then I cannot see a need for a 3.6.x patch.
          Hide
          Michael Dodsworth added a comment -

          Thank you, Jan.

          From what I can tell, '/' only became a reserved character since 4.0 - https://issues.apache.org/jira/browse/LUCENE-2604.

          Show
          Michael Dodsworth added a comment - Thank you, Jan. From what I can tell, '/' only became a reserved character since 4.0 - https://issues.apache.org/jira/browse/LUCENE-2604 .
          Jan Høydahl made changes -
          Fix Version/s 3.6.1 [ 12320754 ]
          Jan Høydahl made changes -
          Attachment SOLR-3467-lucene_solr_3_6.patch [ 12533641 ]
          Hide
          Jan Høydahl added a comment -

          This was an easy backport for 3.6.1

          Show
          Jan Høydahl added a comment - This was an easy backport for 3.6.1
          Jan Høydahl made changes -
          Attachment SOLR-3467.patch [ 12533638 ]
          Hide
          Jan Høydahl added a comment -

          Updated trunk patch with extended test and CHANGES entry. Looks good to me. Any other comments before commit?

          Show
          Jan Høydahl added a comment - Updated trunk patch with extended test and CHANGES entry. Looks good to me. Any other comments before commit?
          Jan Høydahl made changes -
          Fix Version/s 5.0 [ 12321664 ]
          Affects Version/s 3.6 [ 12319065 ]
          Affects Version/s 4.0 [ 12314992 ]
          Jan Høydahl made changes -
          Assignee Jan Høydahl [ janhoy ]
          Michael Dodsworth made changes -
          Attachment SOLR-3467.patch [ 12533582 ]
          Michael Dodsworth made changes -
          Attachment SOLR-3467.patch [ 12533582 ]
          Attachment SOLR-3467.patch [ 12533583 ]
          Hide
          Michael Dodsworth added a comment -

          added test.

          Thanks for looking at the patch.

          Show
          Michael Dodsworth added a comment - added test. Thanks for looking at the patch.
          Hide
          Jan Høydahl added a comment -

          Great. Are you able to add a JUnit test which reproduces the bug and shows that it is fixed?

          Show
          Jan Høydahl added a comment - Great. Are you able to add a JUnit test which reproduces the bug and shows that it is fixed?
          Jan Høydahl made changes -
          Link This issue is part of SOLR-2368 [ SOLR-2368 ]
          Hide
          Michael Dodsworth added a comment -

          all feedback/review comments welcome

          Show
          Michael Dodsworth added a comment - all feedback/review comments welcome
          Michael Dodsworth made changes -
          Field Original Value New Value
          Attachment SOLR-3467.patch [ 12527988 ]
          Michael Dodsworth created issue -

            People

            • Assignee:
              Jan Høydahl
              Reporter:
              Michael Dodsworth
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development