Is it possible to set the maximum number of characters entered in a search bar?

Is it possible to set the maximum number of characters entered in a search bar?

Starting with version 2.8.0 of the Elastic Search and version 1.27.0 of the Advanced Search modules, a new feature to limit the search query length. was added. You need to install the 'amasty/module-advanced-search-subscription-functionality’ package from composer suggest to use this functionality (the functionality is available as a part of an active product subscription or support subscription). 

When the module is installed, you will be able to add Max Characters value to the according field in Amasty > Advanced Search > Configuration > General:

  1. If the field is empty, there is no front-end restriction on the maximum search query length.
  2. If the field contains a value, only search queries whose length is less than or equal to the specified number are used for front-end search. All characters in the query are counted.
  3. The field accepts only positive whole numbers.
  4. The value in the Max Characters field must be greater than the value specified in the Min Characters field.