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, Trunk
    • 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.patch
        8 kB
        Jan Høydahl
      2. SOLR-3467.patch
        3 kB
        Jan Høydahl
      3. SOLR-3467.patch
        2 kB
        Michael Dodsworth
      4. SOLR-3467.patch
        0.6 kB
        Michael Dodsworth
      5. SOLR-3467-lucene_solr_3_6.patch
        3 kB
        Jan Høydahl

        Issue Links

          Activity

          Michael Dodsworth created issue -
          Michael Dodsworth made changes -
          Field Original Value New Value
          Attachment SOLR-3467.patch [ 12527988 ]
          Hide
          Michael Dodsworth added a comment -

          all feedback/review comments welcome

          Show
          Michael Dodsworth added a comment - all feedback/review comments welcome
          Jan Høydahl made changes -
          Link This issue is part of SOLR-2368 [ SOLR-2368 ]
          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?
          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.
          Michael Dodsworth made changes -
          Attachment SOLR-3467.patch [ 12533582 ]
          Attachment SOLR-3467.patch [ 12533583 ]
          Michael Dodsworth made changes -
          Attachment SOLR-3467.patch [ 12533582 ]
          Jan Høydahl made changes -
          Assignee Jan Høydahl [ janhoy ]
          Jan Høydahl made changes -
          Fix Version/s 5.0 [ 12321664 ]
          Affects Version/s 3.6 [ 12319065 ]
          Affects Version/s 4.0 [ 12314992 ]
          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 -
          Attachment SOLR-3467.patch [ 12533638 ]
          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-lucene_solr_3_6.patch [ 12533641 ]
          Jan Høydahl made changes -
          Fix Version/s 3.6.1 [ 12320754 ]
          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 .
          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
          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
          Jan Høydahl made changes -
          Attachment SOLR-3467.patch [ 12533787 ]
          Jan Høydahl made changes -
          Fix Version/s 3.6.1 [ 12320754 ]
          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 -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Hide
          Michael Dodsworth added a comment -

          much appreciated, Jan. Thank you.

          Show
          Michael Dodsworth added a comment - much appreciated, Jan. Thank you.
          Hide
          Hoss Man added a comment -

          hoss20120711-manual-post-40alpha-change

          Show
          Hoss Man added a comment - hoss20120711-manual-post-40alpha-change
          Hoss Man made changes -
          Fix Version/s 4.0 [ 12322455 ]
          Fix Version/s 4.0-ALPHA [ 12314992 ]
          Uwe Schindler made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Resolved Resolved
          41d 6h 30m 1 Jan Høydahl 28/Jun/12 10:06
          Resolved Resolved Closed Closed
          316d 1h 34m 1 Uwe Schindler 10/May/13 11:40

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development