docs: def query(self, search, query):
          '''
          Customize the search query if necessary.
  
          It handles the following features:
           - negation support
           - optional fuzziness
           - optional analyzer
           - optional match_type
          '''
          if not query:
              return search
  
          included, excluded = [], []
          for term in query.split(' '):
              if not term.strip():
                  continue
              if term.startswith('-'):
                  excluded.append(term[1:])
              else:
                  included.append(term)
          if included:
              search = search.query(self.multi_match(included))
          for term in excluded:
              search = search.query(~self.multi_match([term]))
          return search