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


##########
oak-search/src/main/java/org/apache/jackrabbit/oak/plugins/index/search/spi/editor/FulltextDocumentMaker.java:
##########
@@ -362,10 +376,15 @@ private boolean addTypedOrderedFields(D doc,
                                           PropertyDefinition pd) {
         // Ignore and warn if property multi-valued as not supported
         if (property.getType().isArray()) {
-            log.warn(
-                    "[{}] Ignoring ordered property {} of type {} for path {} 
as multivalued ordered property not supported",
-                    getIndexName(), pname,
-                    Type.fromTag(property.getType().tag(), true), path);
+            // Log the warning for every 1000 (default to 1000 but 
configurable) occurrences
+            // We could miss certain paths being logged here since the 
DocumentMaker is created for each node state for each index.
+            // But ideally a warning with the property in question should 
suffice.
+            if (!throttleWarnLogs || 
WARN_LOG_COUNTER_MV_ORDERED_PROPERTY.incrementAndGet() % 
throttleWarnLogThreshold == 0) {

Review Comment:
   ```suggestion
               if (!throttleWarnLogs || 
WARN_LOG_COUNTER_MV_ORDERED_PROPERTY.incrementAndGet() == 1 || 
WARN_LOG_COUNTER_MV_ORDERED_PROPERTY.get() % throttleWarnLogThreshold == 0) {
   ```



-- 
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: dev-unsubscr...@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to