(self, value, **kwargs)
Returns an iterator of (btext, frequency, weight, encoded_value)
        tuples for each unique word in the input value.

        The default implementation uses the ``analyzer`` attribute to tokenize
        the value into strings, then encodes them into bytes using UTF-8.
Returns an iterator of (btext, frequency, weight, encoded_value)
        tuples for each unique word in the input value.
Returns an iterator of ( btext frequency weight encoded_value ) tuples for each unique word in the input value .
def index(self, value, **kwargs):
        """Returns an iterator of (btext, frequency, weight, encoded_value)
        tuples for each unique word in the input value.

        The default implementation uses the ``analyzer`` attribute to tokenize
        the value into strings, then encodes them into bytes using UTF-8.
        """

        if not self.format:
            raise Exception("%s field %r cannot index without a format"
                            % (self.__class__.__name__, self))
        if not isinstance(value, (text_type, list, tuple)):
            raise ValueError("%r is not unicode or sequence" % value)
        assert isinstance(self.format, formats.Format)

        if "mode" not in kwargs:
            kwargs["mode"] = "index"

        word_values = self.format.word_values
        ana = self.analyzer
        for tstring, freq, wt, vbytes in word_values(value, ana, **kwargs):
            yield (utf8encode(tstring)[0], freq, wt, vbytes)
def index ( self , value , * * kwargs ) : if not self . format : raise Exception ( "%s field %r cannot index without a format" % ( self . __class__ . __name__ , self ) ) if not isinstance ( value , ( text_type , list , tuple ) ) : raise ValueError ( "%r is not unicode or sequence" % value ) assert isinstance ( self . format , formats . Format ) if "mode" not in kwargs : kwargs [ "mode" ] = "index" word_values = self . format . word_values ana = self . analyzer for tstring , freq , wt , vbytes in word_values ( value , ana , * * kwargs ) : yield ( utf8encode ( tstring ) [ 0 ] , freq , wt , vbytes )