class_docstr: A hand-written query parser built on modular plug-ins. The default
  configuration implements a powerful fielded query language similar to
  Lucene's.
  
  You can use the ``plugins`` argument when creating the object to override
  the default list of plug-ins, and/or use ``add_plugin()`` and/or
  ``remove_plugin_class()`` to change the plug-ins included in the parser.
  
  >>> from whoosh import qparser
  >>> parser = qparser.QueryParser("content", schema)
  >>> parser.remove_plugin_class(qparser.WildcardPlugin)
  >>> parser.add_plugin(qparser.PrefixPlugin())
  >>> parser.parse(u"hello there")
  And([Term("content", u"hello"), Term("content", u"there")])
class_docstr_tok: ["A","hand-written","query","parser","built","on","modular","plug-ins",".","The","default","configuration","implements","a","powerful","fielded","query","language","similar","to","Lucene","'s",".","You","can","use","the","``","plugins","``","argument","when","creating","the","object","to","override","the","default","list","of","plug-ins",",","and\/or","use","``","add_plugin","(",")","``","and\/or","``","remove_plugin_class","(",")","``","to","change","the","plug-ins","included","in","the","parser",".",">",">",">","from","whoosh","import","qparser",">",">",">","parser","=","qparser.QueryParser","(","``","content","''",",","schema",")",">",">",">","parser.remove_plugin_class","(","qparser.WildcardPlugin",")",">",">",">","parser.add_plugin","(","qparser.PrefixPlugin","(",")",")",">",">",">","parser.parse","(","u","''","hello","there","''",")","And","(","[","Term","(","``","content","''",",","u","''","hello","''",")",",","Term","(","``","content","''",",","u","''","there","''",")","]",")"]
docstr: 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.
docstr_tok: ["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","."]
code: 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]
          )
  
imports: import sys
  from whoosh import query
  from whoosh.compat import text_type
  from whoosh.qparser import syntax
  from whoosh.qparser.common import print_debug, QueryParserError
label_desc: Use image node_id 10 for calling the QueryParser obj's underlying member method code with example usage: obj.multitoken_query(spec, texts, fieldname, termclass, boost) and returns: termclass, self, qclass