parameters: (self, search_details, search, limit)
docstring: Browses through all words that need to be compared to the search term.
          It extracts all words of every field associated to models in the fields_per_model parameter.
  
          :param search_details: obtained from `_search_get_details()`
          :param search: search term to which words must be matched against
          :param limit: maximum number of records fetched per model to build the word list
          :return: yields words
docstring_summary: Browses through all words that need to be compared to the search term.
          It extracts all words of every field associated to models in the fields_per_model parameter.
docstring_tokens: Browses through all words that need to be compared to the search term . It extracts all words of every field associated to models in the fields_per_model parameter .
function: def _basic_enumerate_words(self, search_details, search, limit):
          """
          Browses through all words that need to be compared to the search term.
          It extracts all words of every field associated to models in the fields_per_model parameter.
  
          :param search_details: obtained from `_search_get_details()`
          :param search: search term to which words must be matched against
          :param limit: maximum number of records fetched per model to build the word list
          :return: yields words
          """
          match_pattern = '\\w{%s,}' % min(4, len(search) - 3)
          first = escape_psql(search[0])
          for search_detail in search_details:
              model_name, fields = search_detail['model'], search_detail['search_fields']
              model = self.env[model_name]
              if search_detail.get('requires_sudo'):
                  model = model.sudo()
              domain = search_detail['base_domain'].copy()
              fields_domain = []
              fields = set(fields).intersection(model._fields)
              for field in fields:
                  fields_domain.append([(field, '=ilike', '%s%%' % first)])
                  fields_domain.append([(field, '=ilike', '%% %s%%' % first)])
                  fields_domain.append([(field, '=ilike', '%%>%s%%' % first)]) # HTML
              domain.append(OR(fields_domain))
              domain = AND(domain)
              records = model.search_read(domain, fields, limit=1000)
              for record in records:
                  for field, value in record.items():
                      if isinstance(value, str):
                          value = value.lower()
                          if field == 'arch_db':
                              value = text_from_html(value)
                          for word in re.findall(match_pattern, value):
                              if word[0] == search[0]:
                                  yield word.lower()
function_tokens: def _basic_enumerate_words ( self , search_details , search , limit ) : match_pattern = '\\w{%s,}' % min ( 4 , len ( search ) - 3 ) first = escape_psql ( search [ 0 ] ) for search_detail in search_details : model_name , fields = search_detail [ 'model' ] , search_detail [ 'search_fields' ] model = self . env [ model_name ] if search_detail . get ( 'requires_sudo' ) : model = model . sudo ( ) domain = search_detail [ 'base_domain' ] . copy ( ) fields_domain = [ ] fields = set ( fields ) . intersection ( model . _fields ) for field in fields : fields_domain . append ( [ ( field , '=ilike' , '%s%%' % first ) ] ) fields_domain . append ( [ ( field , '=ilike' , '%% %s%%' % first ) ] ) fields_domain . append ( [ ( field , '=ilike' , '%%>%s%%' % first ) ] ) # HTML domain . append ( OR ( fields_domain ) ) domain = AND ( domain ) records = model . search_read ( domain , fields , limit = 1000 ) for record in records : for field , value in record . items ( ) : if isinstance ( value , str ) : value = value . lower ( ) if field == 'arch_db' : value = text_from_html ( value ) for word in re . findall ( match_pattern , value ) : if word [ 0 ] == search [ 0 ] : yield word . lower ( )