|
@@ -75,13 +75,24 @@ is specified.
|
|
|
[float]
|
|
|
==== Memory Considerations
|
|
|
|
|
|
-With the current implementation, all `_parent` field values and all `_id`
|
|
|
-field values of parent documents are loaded into memory (heap) via field data
|
|
|
-in order to support fast lookups, so make sure there is enough memory for it.
|
|
|
+In order to support parent-child joins, all of the (string) parent IDs
|
|
|
+must be resident in memory (in the <<index-modules-fielddata,field data cache>>.
|
|
|
+Additionaly, every child document is mapped to its parent using a long
|
|
|
+value (approximately). It is advisable to keep the string parent ID short
|
|
|
+in order to reduce memory usage.
|
|
|
+
|
|
|
+You can check how much memory is being used by the ID cache using the
|
|
|
+<<indices-stats,indices stats>> or <<cluster-nodes-stats,nodes stats>>
|
|
|
+APIS, eg:
|
|
|
+
|
|
|
+[source,js]
|
|
|
+--------------------------------------------------
|
|
|
+curl -XGET "http://localhost:9200/_stats/id_cache?pretty&human"
|
|
|
+--------------------------------------------------
|
|
|
|
|
|
[float]
|
|
|
==== Caching
|
|
|
|
|
|
The `has_child` filter cannot be cached in the filter cache. The `_cache`
|
|
|
and `_cache_key` options are a no-op in this filter. Also any filter that
|
|
|
-wraps the `has_child` filter either directly or indirectly will not be cached.
|
|
|
+wraps the `has_child` filter either directly or indirectly will not be cached.
|