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


##########
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 wonder, is this code used for stopwords as well? I thought it's just 
mappings... If that's the case, I think it's better to rename the method from 
loadContent to loadMappingFileContent or so...



-- 
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