You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Gus Heck (JIRA)" <ji...@apache.org> on 2018/10/22 14:28:00 UTC

[jira] [Comment Edited] (SOLR-10894) Streaming expressions handling of escaped special characters bug

    [ https://issues.apache.org/jira/browse/SOLR-10894?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16659039#comment-16659039 ] 

Gus Heck edited comment on SOLR-10894 at 10/22/18 2:27 PM:
-----------------------------------------------------------

My testing seems to indicate that this is now working at the expression parser level, though the annotate seems to say the relevant code came in in 2015, so maybe this crops up as a url encoding issue when we distribute the query (note the '+' )? Also note that the supplied slash escaped expression doesn't work in java since + isn't a legal escape sequence. Attaching patch verifying this works at the expression level in java (minus the illegal escape sequence) 


was (Author: gus_heck):
My testing seems to indicate that this is now working at the expression parser level, though the annotate seems to say the relevant code came in in 2015, so maybe this crops up as a url encoding issue when we distribute the query (note the '+' )? Attaching patch verifying this works at the expression level in java (minus the illegal escape sequence) Also note that the supplied slash escaped expression doesn't work in java since \+ isn't a legal escape sequence

> Streaming expressions handling of escaped special characters bug
> ----------------------------------------------------------------
>
>                 Key: SOLR-10894
>                 URL: https://issues.apache.org/jira/browse/SOLR-10894
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: streaming expressions
>            Reporter: Houston Putman
>            Priority: Major
>         Attachments: SOLR-10894.patch
>
>
> 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.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org