ElasticSearch version 7.14.0 can't highlight with search_as_you_type datatype subfield

Here is my example to reproduce the problem:

PUT mytest
{
  "mappings": {
    "properties": {
      "title": {
        "type": "keyword", 
        "fields": {
          "autocomplete": {
            "type": "search_as_you_type"
          }
        }
      },
      "name": {
        "type": "keyword", 
        "fields": {
          "text": {
            "type": "text"
          }
        }
      },
      "myauto": {
        "type": "search_as_you_type"
      }
    }
  }
}
POST mytest/_doc/1
{
  "title": "go to school",
  "name": "new way",
  "myauto": "go to school"
}
POST mytest/_doc/2
{
  "title": "I love you",
  "name": "love",
  "myauto": "I love you"
}

When I use version 7.9.0, highlight worked fine with the query bellow:

GET mytest/_search
{
  "_source": [],
  "query": {
    "multi_match": {
      "boost": 0.9,
      "fields": [
        "title.autocomplete",
        "title.autocomplete._2gram",
        "title.autocomplete._3gram"
      ],
      "fuzziness": 1,
      "query": "school",
      "type": "bool_prefix"
    }
  },
  "highlight": {
    "fields": {
      "title.autocomplete._index_prefix": {}
    }
  }
}

But on version 7.14.0, I can't get a highlight on the result with the same query above.
I don't know what happened with the new version. I Hope will get help from the community. Thanks in advance.

Does anyone know this issue?? :slight_smile:

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