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

ASF subversion and git services commented on ATLAS-3983:
--------------------------------------------------------

Commit 34cc3c023681ffcf930adf5e5874317f41949cd4 in atlas's branch 
refs/heads/branch-2.0 from Madhan Neethiraj
[ https://gitbox.apache.org/repos/asf?p=atlas.git;h=34cc3c0 ]

ATLAS-3983: solr index query escape character handling

(cherry picked from commit 8bb3e853ea128e1eb2b181e8db869bf7d8050181)


> Update handling of special characters in query-value for index-search
> ---------------------------------------------------------------------
>
>                 Key: ATLAS-3983
>                 URL: https://issues.apache.org/jira/browse/ATLAS-3983
>             Project: Atlas
>          Issue Type: Improvement
>          Components:  atlas-core
>            Reporter: Madhan Neethiraj
>            Assignee: Madhan Neethiraj
>            Priority: Major
>             Fix For: 3.0.0, 2.2.0
>
>         Attachments: ATLAS-3983.patch
>
>
> When query-value contains special characters, {{+-&|!(){}[]^"~*?:\/}}, Atlas 
> skips index-search and switches to graph-query, which could be expensive. 
> Index-search can still be used by escaping the special characters with a 
> backslash, per following Lucene documentation 
> [here|https://lucene.apache.org/core/6_5_1/queryparser/org/apache/lucene/queryparser/classic/package-summary.html#Escaping_Special_Characters]:
> {noformat}
> Escaping Special Characters
> Lucene supports escaping special characters that are part of the query 
> syntax. The current list special characters are
> + - && || ! ( ) { } [ ] ^ " ~ * ? : \ /
> To escape these character use the \ before the character. For example to 
> search for (1+1):2 use the query:
> \(1\+1\)\:2
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to