(self, matcher, segment_docnum)
Returns a key for the current match.

        :param matcher: a :class:`whoosh.matching.Matcher` object. If
            ``self.needs_current`` is ``False``, DO NOT use this object,
            since it may be inconsistent. Use the given ``segment_docnum``
            instead.
        :param segment_docnum: the segment-relative document number of the
            current match.
Returns a key for the current match.
Returns a key for the current match .
def key_for(self, matcher, segment_docnum):
        """Returns a key for the current match.

        :param matcher: a :class:`whoosh.matching.Matcher` object. If
            ``self.needs_current`` is ``False``, DO NOT use this object,
            since it may be inconsistent. Use the given ``segment_docnum``
            instead.
        :param segment_docnum: the segment-relative document number of the
            current match.
        """

        # Backwards compatibility
        if hasattr(self, "key_for_id"):
            return self.key_for_id(segment_docnum)
        elif hasattr(self, "key_for_matcher"):
            return self.key_for_matcher(matcher)

        raise NotImplementedError(self.__class__)
def key_for ( self , matcher , segment_docnum ) : # Backwards compatibility if hasattr ( self , "key_for_id" ) : return self . key_for_id ( segment_docnum ) elif hasattr ( self , "key_for_matcher" ) : return self . key_for_matcher ( matcher ) raise NotImplementedError ( self . __class__ )