Parcourir la source

parent/child field data is an exception to the rule, because it is based on two fields...

Martijn van Groningen il y a 10 ans
Parent
commit
948da82f90

+ 9 - 1
core/src/main/java/org/elasticsearch/index/fielddata/plain/ParentChildIndexFieldData.java

@@ -131,7 +131,15 @@ public class ParentChildIndexFieldData extends AbstractIndexFieldData<AtomicPare
                 }
             };
         } else {
-            return super.load(context);
+            try {
+                return cache.load(context, this);
+            } catch (Throwable e) {
+                if (e instanceof ElasticsearchException) {
+                    throw (ElasticsearchException) e;
+                } else {
+                    throw new ElasticsearchException(e.getMessage(), e);
+                }
+            }
         }
     }