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


##########
oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/index/ElasticCustomAnalyzer.java:
##########
@@ -218,30 +281,62 @@ private static String normalize(String value) {
     }
 
     private static Map<String, Object> convertNodeState(NodeState state) {
-        return convertNodeState(state, Collections.emptyMap());
+        return convertNodeState(state, List.of(), List.of());
     }
 
-    private static Map<String, Object> convertNodeState(NodeState state, 
Map<String, String> mapping) {
-        return 
StreamSupport.stream(Spliterators.spliteratorUnknownSize(state.getProperties().iterator(),
 Spliterator.ORDERED), false)
+    private static Map<String, Object> convertNodeState(NodeState state, 
List<Function<Map<String, Object>, Map<String, Object>>> transformers,
+                                                        List<String> 
preloadedContent) {
+        Map<String, Object> luceneParams = 
StreamSupport.stream(Spliterators.spliteratorUnknownSize(state.getProperties().iterator(),
 Spliterator.ORDERED), false)

Review Comment:
   I agree the way of creating the stream is a bit awkward but using a 
for/while would mean nesting the logic in the `filter/map/collect` making this 
part less readable. I would have used the pre-Java 8 style if this logic was 
less complex than the one required here.



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