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


##########
oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/query/ElasticRequestHandler.java:
##########
@@ -131,6 +130,9 @@ public class ElasticRequestHandler {
 
     private static final String HIGHLIGHT_PREFIX = "<strong>";
     private static final String HIGHLIGHT_SUFFIX = "</strong>";
+    // by default, highlight analyzes up to 1M characters. If the content is 
larger than that, an error is thrown.
+    // To avoid that we need to set a limit lower than that.
+    private static final int HIGHLIGHT_MAX_ANALYZED_OFFSET = 999_999;

Review Comment:
   From the issue it seems that this behaviour should have been back ported to 
v8.19.x but it's not correct. After looking at elastic source code, I 
discovered this is only available in v.9.x. Added a TODO comment to use the 
special value `-1` after the upgrade.



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