From what I can tell: https://github.com/apache/lucene/pull/12380 is the cause.



I am still digging into the deeper reason. It seems like we shouldn't call `get` but instead should call `finish()`

Replicate:
```
./gradlew ':rest-api-spec:yamlRestTest' --tests "org.elasticsearch.test.rest.ClientYamlTestSuiteIT.test {yaml=suggest/30_context/Skip duplicates with contexts should work}"
```

<details>
<summary> Trace </summary>


```
 1> [2023-08-22T18:25:26,962][ERROR][o.e.b.ElasticsearchUncaughtExceptionHandler] [test-cluster-0] fatal error in thread [elasticsearch[test-cluster-0][search][T#1]], exiting java.lang.AssertionError
  1>    at org.apache.lucene.suggest@9.8.0-snapshot-6a2d2c4057b/org.apache.lucene.search.suggest.document.TopSuggestDocsCollector.get(TopSuggestDocsCollector.java:146)
  1>    at org.elasticsearch.server@8.11.0-SNAPSHOT/org.elasticsearch.search.suggest.completion.CompletionSuggester.innerExecute(CompletionSuggester.java:50)
  1>    at org.elasticsearch.server@8.11.0-SNAPSHOT/org.elasticsearch.search.suggest.completion.CompletionSuggester.innerExecute(CompletionSuggester.java:30)
  1>    at org.elasticsearch.server@8.11.0-SNAPSHOT/org.elasticsearch.search.suggest.Suggester.execute(Suggester.java:42)
  1>    at org.elasticsearch.server@8.11.0-SNAPSHOT/org.elasticsearch.search.suggest.SuggestPhase.execute(SuggestPhase.java:42)
  1>    at org.elasticsearch.server@8.11.0-SNAPSHOT/org.elasticsearch.search.query.QueryPhase.executeQuery(QueryPhase.java:116)
  1>    at org.elasticsearch.server@8.11.0-SNAPSHOT/org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:63)
  1>    at org.elasticsearch.server@8.11.0-SNAPSHOT/org.elasticsearch.search.SearchService.loadOrExecuteQueryPhase(SearchService.java:515)
  1>    at org.elasticsearch.server@8.11.0-SNAPSHOT/org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:667)
  1>    at org.elasticsearch.server@8.11.0-SNAPSHOT/org.elasticsearch.search.SearchService.lambda$executeQueryPhase$2(SearchService.java:540)
  1>    at org.elasticsearch.server@8.11.0-SNAPSHOT/org.elasticsearch.action.ActionRunnable$2.accept(ActionRunnable.java:51)
  1>    at org.elasticsearch.server@8.11.0-SNAPSHOT/org.elasticsearch.action.ActionRunnable$2.accept(ActionRunnable.java:48)
  1>    at org.elasticsearch.server@8.11.0-SNAPSHOT/org.elasticsearch.action.ActionRunnable$3.doRun(ActionRunnable.java:73)
  1>    at org.elasticsearch.server@8.11.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:26)
  1>    at org.elasticsearch.server@8.11.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.TimedRunnable.doRun(TimedRunnable.java:33)
  1>    at org.elasticsearch.server@8.11.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:983)
  1>    at org.elasticsearch.server@8.11.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:26)
  1>    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
  1>    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
  1>    at java.base/java.lang.Thread.run(Thread.java:1623)
```

</details>
server/src/main/java/org/elasticsearch/search/suggest/completion/CompletionSuggester.java
CharsRefBuilder spare
    ) throws IOException {
        if (suggestionContext.getFieldType() != null) {
            final CompletionFieldMapper.CompletionFieldType fieldType = suggestionContext.getFieldType();
            CompletionSuggestion completionSuggestion = emptySuggestion(name, suggestionContext, spare);
            int shardSize = suggestionContext.getShardSize() != null ? suggestionContext.getShardSize() : suggestionContext.getSize();
            TopSuggestGroupDocsCollector collector = new TopSuggestGroupDocsCollector(shardSize, suggestionContext.isSkipDuplicates());
            suggest(searcher, suggestionContext.toQuery(), collector);
            int numResult = 0;
            for (TopSuggestDocs.SuggestScoreDoc suggestDoc : collector.get().scoreLookupDocs()) {
                
                Map<String, Set<String>> contexts = Collections.emptyMap();
                if (fieldType.hasContextMappings()) {
                    List<CharSequence> rawContexts = collector.getContexts(suggestDoc.doc);
                    if (rawContexts.size() > 0) {
                        contexts = fieldType.getContextMappings().getNamedContexts(rawContexts);
                    }
                }
                if (numResult++ < suggestionContext.getSize()) {
                    CompletionSuggestion.Entry.Option option = new CompletionSuggestion.Entry.Option(
                        suggestDoc.doc,
                        new Text(suggestDoc.key.toString()),
                        suggestDoc.score,
                        contexts
                    );
                    completionSuggestion.getEntries().get(0).addOption(option);
                } else {
                    break;
                }
            }