Show highlights for matched terms query (for integer values)

We've got a mapping for field 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.


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!

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.