From 967e72723b692114aa8357387b6b6292d1aab868 Mon Sep 17 00:00:00 2001 From: Ross Lawley Date: Wed, 15 Jun 2011 14:55:38 +0100 Subject: [PATCH] Added note to item_frequencies method. Current implementation is relatively simple, for complex schemas the user will have to write their own map reduce. --- mongoengine/queryset.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mongoengine/queryset.py b/mongoengine/queryset.py index 4ffa5324..76d4d1cd 100644 --- a/mongoengine/queryset.py +++ b/mongoengine/queryset.py @@ -1400,6 +1400,12 @@ class QuerySet(object): the whole queried set of documents, and their corresponding frequency. This is useful for generating tag clouds, or searching documents. + .. note:: + Can only do direct simple mappings and cannot map across + :class:`~mongoengine.ReferenceField` or + :class:`~mongoengine.GenericReferenceField` for more complex + counting a manual map reduce call would is required. + If the field is a :class:`~mongoengine.ListField`, the items within each list will be counted individually.