We've got a mapping for field classes:
classes
"classes" : { "type" : "integer" }
Is there a way to show highlight for the matching classes if we search it e.g. via terms-query:
{ "terms" : { "classes" : [ 1, 5, 10 ] } }
Even if we define the field in "highlight" it doesn't come up.
"highlight"
Thanks!
Hi! I read once that highlight is not applied to numeric types. Anyway, you can create a sub field as keyword and test.
You seem to be right. If the number was keyword instead of integer we are starting to see them highlights. Thanks for the tip!
keyword
integer
© 2020. All Rights Reserved - Elasticsearch
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.