-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/72936/
-----------------------------------------------------------

Review request for atlas, Ashutosh Mestry, Jayendra Parab, Nikhil Bonte, Nixon 
Rodrigues, Pinal Shah, Sarath Subramanian, and Sidharth Mishra.


Repository: atlas


Description
-------

Instead of switching to graph-query when a search attribute value contains a 
special character, escaping the value with a backslash - per following in 
Lucene documentation at 
https://lucene.apache.org/core/6_5_1/queryparser/org/apache/lucene/queryparser/classic/package-summary.html#Escaping_Special_Characters:
  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


Diffs
-----

  intg/src/main/java/org/apache/atlas/type/AtlasClassificationType.java 
e0843cbba 
  intg/src/main/java/org/apache/atlas/type/AtlasEntityType.java 58de4cc47 
  intg/src/main/java/org/apache/atlas/type/AtlasStructType.java b0d88fc47 
  
repository/src/main/java/org/apache/atlas/discovery/GraphIndexQueryBuilder.java 
35d64b73e 
  repository/src/main/java/org/apache/atlas/discovery/SearchContext.java 
2cb287f8a 
  repository/src/main/java/org/apache/atlas/discovery/SearchProcessor.java 
da9dd66bf 


Diff: https://reviews.apache.org/r/72936/diff/1/


Testing
-------

- pre-commit tests run: 
https://ci-builds.apache.org/job/Atlas/job/PreCommit-ATLAS-Build-Test/64/
- verified that basic-search uses index-search for search for attribute values 
containing special characters, like "-" in guid, and returns correct results


Thanks,

Madhan Neethiraj

Reply via email to