### Environment:
Elasticsearch version:
```
{
    "number" : "7.15.0",
    "build_flavor" : "default",
    "build_type" : "zip",
    "build_hash" : "79d65f6e357953a5b3cbcc5e2c7c21073d89aa29",
    "build_date" : "2021-09-16T03:05:29.143308416Z",
    "build_snapshot" : false,
    "lucene_version" : "8.9.0",
    "minimum_wire_compatibility_version" : "6.8.0",
    "minimum_index_compatibility_version" : "6.0.0-beta1"
}
```
Plugins installed: []
JVM version :1.8
OS version :Windows 10

### Steps to reproduce:
```
PUT test_plain_highlighter 
{}

POST /test_plain_highlighter/_doc/1
{
  "description": [
    "Lorem Ipsum string Generator that helps to create dummy text for all layout needs.",
    "It has roots in a piece of classical Latin literature from 45 BC, making it search string over 2000 years old."
  ]
}

POST /test_plain_highlighter/_search
{
  "highlight": {
    "order": "score",
    "type": "plain",
    "fields": {
      "*": {}
    },
    "fragment_size": 50
  },
  "query": {
    "match": {
      "description": "search string"
    }
  },
  "_source": ""
}
```

### RECEIVED Highlighted Fragment in response:
```
[
   "Lorem Ipsum <em>string</em> Generator that helps to create",
   " literature from 45 BC, making it <em>search</em> <em>string</em> over 2000 years old."
]
```
### EXPECTED Highlighted Fragment:
```
[
   " literature from 45 BC, making it <em>search</em> <em>string</em> over 2000 years old.",
   "Lorem Ipsum <em>string</em> Generator that helps to create"
]
```
server/src/test/java/org/elasticsearch/search/fetch/subphase/highlight/PlainHighlighterTests.java
/*
 * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
 * or more contributor license agreements. Licensed under the Elastic License
 * 2.0 and the Server Side Public License, v 1; you may not use this file except
 * in compliance with, at your election, the Elastic License 2.0 or the Server
 * Side Public License, v 1.
 */
package org.elasticsearch.search.fetch.subphase.highlight;
import org.apache.lucene.index.Term;
import org.apache.lucene.search.PhraseQuery;
import org.apache.lucene.search.Query;
import org.apache.lucene.search.highlight.QueryScorer;
import org.apache.lucene.tests.analysis.MockAnalyzer;
import org.apache.lucene.tests.util.LuceneTestCase;
public class PlainHighlighterTests extends LuceneTestCase {
    public void testHighlightPhrase() throws Exception {
        Query query = new PhraseQuery.Builder().add(new Term("field", "foo")).add(new Term("field", "bar")).build();
        QueryScorer queryScorer = new CustomQueryScorer(query);
        org.apache.lucene.search.highlight.Highlighter highlighter = new org.apache.lucene.search.highlight.Highlighter(queryScorer);
        String[] frags = highlighter.getBestFragments(new MockAnalyzer(random()), "field", "bar foo bar foo", 10);
        assertArrayEquals(new String[] { "bar <B>foo</B> <B>bar</B> foo" }, frags);
    }
}