chibulcuteanu commented on code in PR #923:
URL: https://github.com/apache/jackrabbit-oak/pull/923#discussion_r1183813512


##########
oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/index/ElasticCustomAnalyzer.java:
##########
@@ -189,6 +189,10 @@ private static List<String> loadContent(NodeState file, 
String name) throws IOEx
             try (BufferedReader br = new BufferedReader(content)) {
                 return br.lines()
                         .map(String::trim)
+                        // remove empty lines and comments
+                        .filter(l -> l.length() > 0 && !l.startsWith("#"))

Review Comment:
   I saw a different index definition with comments that start with `|`.
   E.g 
[stopwords.txt](https://github.com/apache/jackrabbit-oak/files/11383877/stopwords.txt)
   I don't think this will protect against that case.
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to