amit-jain commented on code in PR #1071:
URL: https://github.com/apache/jackrabbit-oak/pull/1071#discussion_r1295553491


##########
oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneDocumentMaker.java:
##########
@@ -315,6 +312,29 @@ protected boolean indexTypeOrderedFields(Document doc, 
String pname, int tag, Pr
         }
         return fieldAdded;
     }
+    
+    private static BytesRef checkTruncateLength(String prop, String value, 
String path, int maxLength) {
+        String truncated = value;
+        if (value.length() > maxLength) {
+            log.warn("Truncating property {} having length {} at path:[{}] as 
it is > {}", prop, value.length(), path, maxLength);
+            truncated = value.substring(0, maxLength);

Review Comment:
   Ah I understood now yes it's a problem for surrogate pairs



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