code: def search(self, query, search_term, search_field, catalog):
          
          logger.info("Reference Widget Catalog: {}".format(catalog.id))
          if not search_term:
              return catalog(query)
  
          index = self.get_index(search_field, catalog)
          if not index:
              logger.warn("*** Index not found: '{}'".format(search_field))
              return []
  
          meta = index.meta_type
          if meta == "TextIndexNG3":
              query[index.id] = "{}*".format(search_term)
  
          elif meta == "ZCTextIndex":
              logger.warn("*** Field '{}' ({}). Better use TextIndexNG3"
                          .format(meta, search_field))
              query[index.id] = "{}*".format(search_term)
  
          elif meta in ["FieldIndex", "KeywordIndex"]:
              logger.warn("*** Field '{}' ({}). Better use TextIndexNG3"
                          .format(meta, search_field))
              query[index.id] = search_term
  
          else:
              logger.warn("*** Index '{}' ({}) not supported"
                          .format(search_field, meta))
              return []
  
          logger.info("Reference Widget Query: {}".format(repr(query)))
          return catalog(query)
docs: Performs a search against the catalog and returns the brains