For every analyzed text field, ES creates by default a non-analyzed version for a text field under the name keyword.
We should be able to use it, however doc["text_field.keyword"].value doesn't work in painless.
It throws the error "index_out_of_bounds_exception".
For fields that don't exist I get a different error - "No field found for [text_field.keyword2] in mapping with types ", so it seems it should work.
Does this make sense? If yes, is there a workaround?
I wrote an example to reproduce it but it worked, I can't seem to reproduce it.
Apparently painless supports this and something is wrong with my index, will update if I manage to understand how to reproduce it.
Thanks!
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.