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: :param fieldname: the default field -- the parser uses this as the
      field for any terms without an explicit field.
  :param schema: a :class:`whoosh.fields.Schema` object to use when
      parsing. The appropriate fields in the schema will be used to
      tokenize terms/phrases before they are turned into query objects.
      You can specify None for the schema to create a parser that does
      not analyze the text of the query, usually for testing purposes.
  :param plugins: a list of plugins to use. WhitespacePlugin is
      automatically included, do not put it in this list. This overrides
      the default list of plugins. Classes in the list will be
      automatically instantiated.
  :param termclass: the query class to use for individual search terms.
      The default is :class:`whoosh.query.Term`.
  :param phraseclass: the query class to use for phrases. The default
      is :class:`whoosh.query.Phrase`.
  :param group: the default grouping. ``AndGroup`` makes terms required
      by default. ``OrGroup`` makes terms optional by default.
docstr_tok: [":","param","fieldname",":","the","default","field","--","the","parser","uses","this","as","the","field","for","any","terms","without","an","explicit","field",".",":","param","schema",":","a",":","class",":","`","whoosh.fields.Schema","`","object","to","use","when","parsing",".","The","appropriate","fields","in","the","schema","will","be","used","to","tokenize","terms\/phrases","before","they","are","turned","into","query","objects",".","You","can","specify","None","for","the","schema","to","create","a","parser","that","does","not","analyze","the","text","of","the","query",",","usually","for","testing","purposes",".",":","param","plugins",":","a","list","of","plugins","to","use",".","WhitespacePlugin","is","automatically","included",",","do","not","put","it","in","this","list",".","This","overrides","the","default","list","of","plugins",".","Classes","in","the","list","will","be","automatically","instantiated",".",":","param","termclass",":","the","query","class","to","use","for","individual","search","terms",".","The","default","is",":","class",":","`","whoosh.query.Term","`",".",":","param","phraseclass",":","the","query","class","to","use","for","phrases",".","The","default","is",":","class",":","`","whoosh.query.Phrase","`",".",":","param","group",":","the","default","grouping",".","``","AndGroup","``","makes","terms","required","by","default",".","``","OrGroup","``","makes","terms","optional","by","default","."]
code: def __init__(
      self,
      fieldname,
      schema,
      plugins=None,
      termclass=query.Term,
      phraseclass=query.Phrase,
      group=syntax.AndGroup,
  ):
      """
      :param fieldname: the default field -- the parser uses this as the
          field for any terms without an explicit field.
      :param schema: a :class:`whoosh.fields.Schema` object to use when
          parsing. The appropriate fields in the schema will be used to
          tokenize terms/phrases before they are turned into query objects.
          You can specify None for the schema to create a parser that does
          not analyze the text of the query, usually for testing purposes.
      :param plugins: a list of plugins to use. WhitespacePlugin is
          automatically included, do not put it in this list. This overrides
          the default list of plugins. Classes in the list will be
          automatically instantiated.
      :param termclass: the query class to use for individual search terms.
          The default is :class:`whoosh.query.Term`.
      :param phraseclass: the query class to use for phrases. The default
          is :class:`whoosh.query.Phrase`.
      :param group: the default grouping. ``AndGroup`` makes terms required
          by default. ``OrGroup`` makes terms optional by default.
      """
  
      self.fieldname = fieldname
      self.schema = schema
      self.termclass = termclass
      self.phraseclass = phraseclass
      self.group = group
      self.plugins = []
  
      if plugins is None:
          plugins = self.default_set()
      self._add_ws_plugin()
      self.add_plugins(plugins)
  
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 1 to create a new QueryParser object from inherited base classes: object with example: obj = QueryParser(fieldname, schema, plugins, termclass, phraseclass, group)