(self, spec, texts, fieldname, termclass, boost)
Returns a query for multiple texts. This method implements the
        intention specified in the field's ``multitoken_query`` attribute,
        which specifies what to do when strings that look like single terms
        to the parser turn out to yield multiple tokens when analyzed.

        :param spec: a string describing how to join the text strings into a
            query. This is usually the value of the field's
            ``multitoken_query`` attribute.
        :param texts: a list of token strings.
        :param fieldname: the name of the field.
        :param termclass: the query class to use for single terms.
        :param boost: the original term's boost in the query string, should be
            applied to the returned query object.
Returns a query for multiple texts. This method implements the
        intention specified in the field's ``multitoken_query`` attribute,
        which specifies what to do when strings that look like single terms
        to the parser turn out to yield multiple tokens when analyzed.
Returns a query for multiple texts . This method implements the intention specified in the field s multitoken_query attribute which specifies what to do when strings that look like single terms to the parser turn out to yield multiple tokens when analyzed .
def multitoken_query(self, spec, texts, fieldname, termclass, boost):
        """Returns a query for multiple texts. This method implements the
        intention specified in the field's ``multitoken_query`` attribute,
        which specifies what to do when strings that look like single terms
        to the parser turn out to yield multiple tokens when analyzed.

        :param spec: a string describing how to join the text strings into a
            query. This is usually the value of the field's
            ``multitoken_query`` attribute.
        :param texts: a list of token strings.
        :param fieldname: the name of the field.
        :param termclass: the query class to use for single terms.
        :param boost: the original term's boost in the query string, should be
            applied to the returned query object.
        """

        spec = spec.lower()
        if spec == "first":
            # Throw away all but the first token
            return termclass(fieldname, texts[0], boost=boost)
        elif spec == "phrase":
            # Turn the token into a phrase
            return self.phraseclass(fieldname, texts, boost=boost)
        else:
            if spec == "default":
                qclass = self.group.qclass
            elif spec == "and":
                qclass = query.And
            elif spec == "or":
                qclass = query.Or
            else:
                raise QueryParserError("Unknown multitoken_query value %r"
                                       % spec)
            return qclass([termclass(fieldname, t, boost=boost)
                           for t in texts])
def multitoken_query ( self , spec , texts , fieldname , termclass , boost ) : spec = spec . lower ( ) if spec == "first" : # Throw away all but the first token return termclass ( fieldname , texts [ 0 ] , boost = boost ) elif spec == "phrase" : # Turn the token into a phrase return self . phraseclass ( fieldname , texts , boost = boost ) else : if spec == "default" : qclass = self . group . qclass elif spec == "and" : qclass = query . And elif spec == "or" : qclass = query . Or else : raise QueryParserError ( "Unknown multitoken_query value %r" % spec ) return qclass ( [ termclass ( fieldname , t , boost = boost ) for t in texts ] )