You're not doing anything wrong... The query bar doesn't support searching for scripted fields. This is something we're attempting to address in the future though. See https://github.com/elastic/kibana/issues/10789.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.