The short answer is, with the default settings this is not possible, but depending on your expected query patterns you can modify your query or your mapping to support your searches.
Since code is defined as a text field, the text values in this field go through analysis. The built-in analyzer splits and lowercases the terms in the field, so searching cannot be done case sensitively. This is on purpose.
If you need case sensitive search, you can try targeting your search against the code.enum field, which is a keyword subfield of code. Enterprise Search automatically creates this subfield. Keyword fields do not go through the analysis process, so the value is stored as-is (preserving case).
On keyword fields exact matching and prefix searching are supported. Suffix search is also possible ("stic" will find "Elastic"), although it's not recommended due to performance reasons - if that is a requirement, it's better to write an ngram analyzer.
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.