code: function instantSearch() {
  
      const q = $("#searchbox").val();
      if (q === '')
          return;
  
      const matcher = "/matcher?beginsWith=" + q;
      const request = host + matcher;
  
      console.debug(request);
  
      $.getJSON(request, '', {})
          .done(data => {
  
              $("#searchbox").autocomplete({
                  source: data,
                  select: (event) => {
                      event.stopPropagation();
                      $("#search").trigger("click");
                  }
              });
          })
          .fail((d, textStatus, error) => {
  
              const err = d.status + " " + error + " -> message: " + d.responseText;
              bootstrapAlert.error(err);
              console.error(`Search request failed: \n ${err}`);
          });
  }
docs: looking for suggestions