code: def SimpleParser(fieldname, schema, **kwargs):
      """Returns a QueryParser configured to support only +, -, and phrase
      syntax.
      """
  
      from whoosh.qparser import plugins, syntax
  
      pins = [
          plugins.WhitespacePlugin,
          plugins.PlusMinusPlugin,
          plugins.PhrasePlugin,
      ]
      orgroup = syntax.OrGroup
      return QueryParser(
          fieldname, schema, plugins=pins, group=orgroup, **kwargs
      )
  
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 2 for calling a global function with example usage: SimpleParser(fieldname, schema) and returns: QueryParser