Completion suggester failed: org.elasticsearch.common.io.stream.NotSerializableExceptionWrapper: no_such_element_exception: null

Elasticsearch version: 6.8.2

completion field mapping:

"query": { 
            "type": "completion",
            "analyzer": "standard",
            "preserve_separators": true,
            "preserve_position_increments": true,
            "max_input_length": 50,
            "contexts": [ 
              { 
                "name": "source",
                "type": "CATEGORY",
                "path": "source"
              }
            ]
          },
          "source": {
            "type": "keyword"
          }

search dsl:

{
  "suggest": {
    "song-suggest": {
      "prefix": "急性",
      "completion": {
        "field": "query",
        "size": 10,
        "contexts": {
          "source": "alia"
        }
      }
    }
  }
}

exception:

org.elasticsearch.action.search.SearchPhaseExecutionException: all shards failed
	at org.elasticsearch.action.search.AbstractSearchAsyncAction.onPhaseFailure(AbstractSearchAsyncAction.java:336) [elasticsearch-6.8.2.jar:6.8.2]
	at org.elasticsearch.action.search.AbstractSearchAsyncAction.executeNextPhase(AbstractSearchAsyncAction.java:143) [elasticsearch-6.8.2.jar:6.8.2]
	at org.elasticsearch.action.search.AbstractSearchAsyncAction.onPhaseDone(AbstractSearchAsyncAction.java:299) [elasticsearch-6.8.2.jar:6.8.2]
	at org.elasticsearch.action.search.InitialSearchPhase.onShardFailure(InitialSearchPhase.java:105) [elasticsearch-6.8.2.jar:6.8.2]
	at org.elasticsearch.action.search.InitialSearchPhase.access$100(InitialSearchPhase.java:49) [elasticsearch-6.8.2.jar:6.8.2]
	at org.elasticsearch.action.search.InitialSearchPhase$2.lambda$onFailure$1(InitialSearchPhase.java:225) [elasticsearch-6.8.2.jar:6.8.2]
	at org.elasticsearch.action.search.InitialSearchPhase.maybeFork(InitialSearchPhase.java:179) [elasticsearch-6.8.2.jar:6.8.2]
	at org.elasticsearch.action.search.InitialSearchPhase.access$000(InitialSearchPhase.java:49) [elasticsearch-6.8.2.jar:6.8.2]
	at org.elasticsearch.action.search.InitialSearchPhase$2.onFailure(InitialSearchPhase.java:225) [elasticsearch-6.8.2.jar:6.8.2]
	at org.elasticsearch.action.search.SearchExecutionStatsCollector.onFailure(SearchExecutionStatsCollector.java:73) [elasticsearch-6.8.2.jar:6.8.2]
	at org.elasticsearch.action.ActionListenerResponseHandler.handleException(ActionListenerResponseHandler.java:59) [elasticsearch-6.8.2.jar:6.8.2]
	at org.elasticsearch.action.search.SearchTransportService$ConnectionCountingHandler.handleException(SearchTransportService.java:473) [elasticsearch-6.8.2.jar:6.8.2]
	at org.elasticsearch.transport.TransportService$ContextRestoreResponseHandler.handleException(TransportService.java:1143) [elasticsearch-6.8.2.jar:6.8.2]
	at org.elasticsearch.transport.TcpTransport.lambda$handleException$24(TcpTransport.java:1041) [elasticsearch-6.8.2.jar:6.8.2]
	at org.elasticsearch.common.util.concurrent.EsExecutors$DirectExecutorService.execute(EsExecutors.java:193) [elasticsearch-6.8.2.jar:6.8.2]
	at org.elasticsearch.transport.TcpTransport.handleException(TcpTransport.java:1039) [elasticsearch-6.8.2.jar:6.8.2]
	at org.elasticsearch.transport.TcpTransport.handlerResponseError(TcpTransport.java:1031) [elasticsearch-6.8.2.jar:6.8.2]
	at org.elasticsearch.transport.TcpTransport.messageReceived(TcpTransport.java:967) [elasticsearch-6.8.2.jar:6.8.2]
	at org.elasticsearch.transport.TcpTransport.inboundMessage(TcpTransport.java:770) [elasticsearch-6.8.2.jar:6.8.2]
	at org.elasticsearch.transport.netty4.Netty4MessageChannelHandler.channelRead(Netty4MessageChannelHandler.java:53) [transport-netty4-client-6.8.2.jar:6.8.2]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [netty-transport-4.1.32.Final.jar:4.1.32.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [netty-transport-4.1.32.Final.jar:4.1.32.Final]
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) [netty-transport-4.1.32.Final.jar:4.1.32.Final]
	at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:323) [netty-codec-4.1.32.Final.jar:4.1.32.Final]
	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:297) [netty-codec-4.1.32.Final.jar:4.1.32.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [netty-transport-4.1.32.Final.jar:4.1.32.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [netty-transport-4.1.32.Final.jar:4.1.32.Final]
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) [netty-transport-4.1.32.Final.jar:4.1.32.Final]
	at io.netty.handler.logging.LoggingHandler.channelRead(LoggingHandler.java:241) [netty-handler-4.1.32.Final.jar:4.1.32.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [netty-transport-4.1.32.Final.jar:4.1.32.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [netty-transport-4.1.32.Final.jar:4.1.32.Final]
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) [netty-transport-4.1.32.Final.jar:4.1.32.Final]
	at io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1436) [netty-handler-4.1.32.Final.jar:4.1.32.Final]
	at io.netty.handler.ssl.SslHandler.decodeJdkCompatible(SslHandler.java:1203) [netty-handler-4.1.32.Final.jar:4.1.32.Final]
	at io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1247) [netty-handler-4.1.32.Final.jar:4.1.32.Final]
	at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:502) [netty-codec-4.1.32.Final.jar:4.1.32.Final]
	at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:441) [netty-codec-4.1.32.Final.jar:4.1.32.Final]
	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:278) [netty-codec-4.1.32.Final.jar:4.1.32.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [netty-transport-4.1.32.Final.jar:4.1.32.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [netty-transport-4.1.32.Final.jar:4.1.32.Final]
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) [netty-transport-4.1.32.Final.jar:4.1.32.Final]
	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1434) [netty-transport-4.1.32.Final.jar:4.1.32.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [netty-transport-4.1.32.Final.jar:4.1.32.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [netty-transport-4.1.32.Final.jar:4.1.32.Final]
	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:965) [netty-transport-4.1.32.Final.jar:4.1.32.Final]
	at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163) [netty-transport-4.1.32.Final.jar:4.1.32.Final]
	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:656) [netty-transport-4.1.32.Final.jar:4.1.32.Final]
	at io.netty.channel.nio.NioEventLoop.processSelectedKeysPlain(NioEventLoop.java:556) [netty-transport-4.1.32.Final.jar:4.1.32.Final]
	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:510) [netty-transport-4.1.32.Final.jar:4.1.32.Final]
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:470) [netty-transport-4.1.32.Final.jar:4.1.32.Final]
	at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:909) [netty-common-4.1.32.Final.jar:4.1.32.Final]
	at java.lang.Thread.run(Thread.java:834) [?:?]
Caused by: org.elasticsearch.common.io.stream.NotSerializableExceptionWrapper: no_such_element_exception: null
	at java.util.TreeMap.key(TreeMap.java:1324) ~[?:?]
	at java.util.TreeMap.lastKey(TreeMap.java:296) ~[?:?]
	at java.util.TreeSet.last(TreeSet.java:401) ~[?:?]
	at org.apache.lucene.util.fst.Util$TopNSearcher.addIfCompetitive(Util.java:351) ~[lucene-core-7.7.0.jar:7.7.0 fe87b6d46e3b2eb4b9126d6b329a146b622afaba - root - 2023-08-02 11:04:09]
	at org.apache.lucene.util.fst.Util$TopNSearcher.addStartPaths(Util.java:410) ~[lucene-core-7.7.0.jar:7.7.0 fe87b6d46e3b2eb4b9126d6b329a146b622afaba - root - 2023-08-02 11:04:09]
	at org.apache.lucene.search.suggest.document.NRTSuggester.lookup(NRTSuggester.java:234) ~[lucene-suggest-7.7.0.jar:7.7.0 8c831daf4eb41153c25ddb152501ab5bae3ea3d5 - jimczi - 2019-02-04 23:17:46]
	at org.apache.lucene.search.suggest.document.CompletionScorer.score(CompletionScorer.java:70) ~[lucene-suggest-7.7.0.jar:7.7.0 8c831daf4eb41153c25ddb152501ab5bae3ea3d5 - jimczi - 2019-02-04 23:17:46]
	at org.apache.lucene.search.BulkScorer.score(BulkScorer.java:39) ~[lucene-core-7.7.0.jar:7.7.0 fe87b6d46e3b2eb4b9126d6b329a146b622afaba - root - 2023-08-02 11:04:09]
	at org.elasticsearch.search.suggest.completion.CompletionSuggester.suggest(CompletionSuggester.java:91) ~[elasticsearch-6.8.2.jar:6.8.2]
	at org.elasticsearch.search.suggest.completion.CompletionSuggester.innerExecute(CompletionSuggester.java:60) ~[elasticsearch-6.8.2.jar:6.8.2]
	at org.elasticsearch.search.suggest.completion.CompletionSuggester.innerExecute(CompletionSuggester.java:41) ~[elasticsearch-6.8.2.jar:6.8.2]
	at org.elasticsearch.search.suggest.Suggester.execute(Suggester.java:39) ~[elasticsearch-6.8.2.jar:6.8.2]
	at org.elasticsearch.search.suggest.SuggestPhase.execute(SuggestPhase.java:57) ~[elasticsearch-6.8.2.jar:6.8.2]
	at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:97) ~[elasticsearch-6.8.2.jar:6.8.2]
	at org.elasticsearch.search.SearchService.loadOrExecuteQueryPhase(SearchService.java:439) ~[elasticsearch-6.8.2.jar:6.8.2]
	at org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:483) ~[elasticsearch-6.8.2.jar:6.8.2]
	at org.elasticsearch.search.SearchService.access$100(SearchService.java:128) ~[elasticsearch-6.8.2.jar:6.8.2]
	at org.elasticsearch.search.SearchService$2.onResponse(SearchService.java:448) ~[elasticsearch-6.8.2.jar:6.8.2]
	at org.elasticsearch.search.SearchService$2.onResponse(SearchService.java:444) ~[elasticsearch-6.8.2.jar:6.8.2]
	at org.elasticsearch.search.SearchService$4.doRun(SearchService.java:1196) ~[elasticsearch-6.8.2.jar:6.8.2]
	at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) ~[elasticsearch-6.8.2.jar:6.8.2]
	at org.elasticsearch.common.util.concurrent.TimedRunnable.doRun(TimedRunnable.java:41) ~[elasticsearch-6.8.2.jar:6.8.2]
	at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:751) ~[elasticsearch-6.8.2.jar:6.8.2]
	at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) ~[elasticsearch-6.8.2.jar:6.8.2]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[?:?]
	at java.lang.Thread.run(Thread.java:834) ~[?:?]
t type

From Elastic Search to Elasticsearch

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