(self, child, keyfacet, limit=1, order=None)
:param child: the collector to wrap.
        :param keyfacet: a :class:`whoosh.sorting.Facet` to use for collapsing.
            All but the top N documents that share a key will be eliminated
            from the results.
        :param limit: the maximum number of documents to keep for each key.
        :param order: an optional :class:`whoosh.sorting.Facet` to use
            to determine the "top" document(s) to keep when collapsing. The
            default (``orderfaceet=None``) uses the results order (e.g. the
            highest score in a scored search).
:param child: the collector to wrap.
        :param keyfacet: a :class:`whoosh.sorting.Facet` to use for collapsing.
            All but the top N documents that share a key will be eliminated
            from the results.
        :param limit: the maximum number of documents to keep for each key.
        :param order: an optional :class:`whoosh.sorting.Facet` to use
            to determine the "top" document(s) to keep when collapsing. The
            default (``orderfaceet=None``) uses the results order (e.g. the
            highest score in a scored search).
: param child : the collector to wrap . : param keyfacet : a : class : whoosh . sorting . Facet to use for collapsing . All but the top N documents that share a key will be eliminated from the results . : param limit : the maximum number of documents to keep for each key . : param order : an optional : class : whoosh . sorting . Facet to use to determine the top document ( s ) to keep when collapsing . The default ( orderfaceet = None ) uses the results order ( e . g . the highest score in a scored search ) .
def __init__(self, child, keyfacet, limit=1, order=None):
        """
        :param child: the collector to wrap.
        :param keyfacet: a :class:`whoosh.sorting.Facet` to use for collapsing.
            All but the top N documents that share a key will be eliminated
            from the results.
        :param limit: the maximum number of documents to keep for each key.
        :param order: an optional :class:`whoosh.sorting.Facet` to use
            to determine the "top" document(s) to keep when collapsing. The
            default (``orderfaceet=None``) uses the results order (e.g. the
            highest score in a scored search).
        """

        self.child = child
        self.keyfacet = sorting.MultiFacet.from_sortedby(keyfacet)

        self.limit = limit
        if order:
            self.orderfacet = sorting.MultiFacet.from_sortedby(order)
        else:
            self.orderfacet = None
def __init__ ( self , child , keyfacet , limit = 1 , order = None ) : self . child = child self . keyfacet = sorting . MultiFacet . from_sortedby ( keyfacet ) self . limit = limit if order : self . orderfacet = sorting . MultiFacet . from_sortedby ( order ) else : self . orderfacet = None