code: def do_minus(self, parser, group):
          '''This filter sorts nodes in a flat group into "required", "default",
          and "banned" subgroups based on the presence of plus and minus nodes.
          '''
          grouper = group.__class__()
          
          next_not = None
          for node in group:
              if isinstance(node, self.Minus):
                  if next_not is not None:
                      # Two Minuses in a row; skip the second one
                      continue
                  next_not = whoosh.qparser.syntax.NotGroup()
                  grouper.append(next_not)
              else:
                  # Nodes with children: search for nested Minus nodes
                  if isinstance(node, whoosh.qparser.syntax.GroupNode):
                      node = self.do_minus(parser, node)
                  if next_not is not None:
                      next_not.append(node)
                      next_not = None
                  else:
                      grouper.append(node)
          if next_not is not None:
              # Remove the empty NotGroup
              grouper.pop()
          
          return groupef do_minus(self, parser, group):
          '''This filter sorts nodes in a flat group into "required", "default",
          and "banned" subgroups based on the presence of plus and minus nodes.
          '''
          grouper = group.__class__()
          
          next_not = None
          for node in group:
              if isinstance(node, self.Minus):
                  if next_not is not None:
                      # Two Minuses in a row; skip the second one
                      continue
                  next_not = whoosh.qparser.syntax.NotGroup()
                  grouper.append(next_not)
              else:
                  # Nodes with children: search for nested Minus nodes
                  if isinstance(node, whoosh.qparser.syntax.GroupNode):
                      node = self.do_minus(parser, node)
                  if next_not is not None:
                      next_not.append(node)
                      next_not = None
                  else:
                      grouper.append(node)
          if next_not is not None:
              # Remove the empty NotGroup
              grouper.pop()
          
          return grouper
docs: This filter sorts nodes in a flat group into "required", "default",
          and "banned" subgroups based on the presence of plus and minus nodes.