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

Streaming expressions handling of escaped special characters bug

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • streaming expressions
    • None

    Description

      Streaming expressions expect all special characters in named parameter values to be singly escaped. Since queries can contain strings surrounded by double quotes, double-escaping is necessary.

      Given the following query:
      summary:"\"This is a summary\"+"
      A streaming expression would require surrounding the query with double quotes, therefore every special character in the query should be escaped:
      select(collection,q="\"\\\"This is a summary\\\"\\\+\"",....)

      Streaming expressions should unescape the strings contained within double quotes, however currently they are only unescaping \" -> ". Therefore it is impossible to query for text fields containing double quotes. Also other special characters are not unescaped; this inconsistency causes confusion.

      Attachments

        1. SOLR-10894.patch
          3 kB
          Gus Heck

        Issue Links

          Activity

            githubbot ASF GitHub Bot logged work - 13/Jul/23 12:41
            githubbot ASF GitHub Bot logged work - 13/Jul/23 12:41
            • Time Spent:
              10m
               
              sonatype-lift[bot] commented on PR #1781:
              URL: https://github.com/apache/solr/pull/1781#issuecomment-1634175546

                 ## Sonatype Lift is retiring
                 Sonatype Lift will be retiring on <b>Sep 12, 2023</b>, with its analysis stopping on Aug 12, 2023. We understand that this news may come as a disappointment, and Sonatype is committed to helping you transition off it seamlessly. If you’d like to retain your data, please export your issues from the web console.
                 We are extremely grateful and thank you for your support over the years.
                 
                 <b>[📖 Read about the impacts and timeline](https://www.sonatype.com/lift-retirement)&lt;/b>


            githubbot ASF GitHub Bot logged work - 01/Aug/23 17:06
            • Time Spent:
              10m
               
              HoustonPutman commented on PR #1781:
              URL: https://github.com/apache/solr/pull/1781#issuecomment-1660754431

                 Hey @magibney I have a change to make this just generic for any number of escapes of the quote. (for example if there was an escaped quote in a phrase query)
                 
                 Mind if I push to your branch?


            githubbot ASF GitHub Bot logged work - 15/Feb/24 12:20

            People

              Unassigned Unassigned
              houstonputman Houston Putman
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

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