code: def DisMaxParser(fieldboosts, schema, tiebreak=0.0, **kwargs):
      """Returns a QueryParser configured to support only +, -, and phrase
      syntax, and which converts individual terms into DisjunctionMax queries
      across a set of fields.
  
      :param fieldboosts: a dictionary mapping field names to boosts.
      """
  
      from whoosh.qparser import plugins, syntax
  
      mfp = plugins.MultifieldPlugin(
          list(fieldboosts.keys()),
          fieldboosts=fieldboosts,
          group=syntax.DisMaxGroup,
      )
      pins = [
          plugins.WhitespacePlugin,
          plugins.PlusMinusPlugin,
          plugins.PhrasePlugin,
          mfp,
      ]
      orgroup = syntax.OrGroup
      return QueryParser(
          None, 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 3 for calling a global function with example usage: DisMaxParser(fieldboosts, schema, tiebreak) and returns: QueryParser