docs: def prepareQueryTerm(self, field, term):
          """Prepare a query term for inclusion in a query.
  
          This escapes the term and if necessary, wraps the term in quotes.
  
          """
          if term == "*":
              return term
          addstar = False
          if term[len(term) - 1] == '*':
              addstar = True
              term = term[0 : len(term) - 1]
          term = self.escapeQueryTerm(term)
          if addstar:
              term = '%s*' % term
          if self.getSolrType(field) in ['string', 'text', 'text_ws']:
              return '"%s"' % term
          return term