Hello,
This error does not occur all the time, it is random, like 3 out of 10 depends on the traffic.
When users perform a wildcard search, for example: exception
1 of 49 shards failed
OS: Red Hat Enterprise Linux Server 7.7
ES Version: 7.3.1
Nodes: 1
Disk Available: 84.03% (1.3 TB / 1.5 TB)
JVM Heap: 7.42% (3.6 GB / 47.9 GB)
Documents: 597,982,988
Disk Usage: 231.6 GB
Primary Shards: 69
Replica Shards: 0
Total Shards: 119
Unassigned Shards: 50
[2019-11-29T23:33:15,802][DEBUG][o.e.a.s.TransportSearchAction] [node-1] [324819] Failed to execute fetch phase
org.elasticsearch.transport.RemoteTransportException: [node-1][10.8.10.61:9300][indices:data/read/search[phase/fetch/id]]
Caused by: org.apache.lucene.util.BytesRefHash$MaxBytesLengthExceededException: bytes can be at most 32766 in length; got 37022
at org.apache.lucene.util.BytesRefHash.add(BytesRefHash.java:265) ~[lucene-core-8.1.0.jar:8.1.0 dbe5ed0b2f17677ca6c904ebae919363f2d36a0a - ishan - 2019-05-09 19:34:03]
at org.apache.lucene.index.memory.MemoryIndex.storeTerms(MemoryIndex.java:593) ~[lucene-memory-8.1.0.jar:8.1.0 dbe5ed0b2f17677ca6c904ebae919363f2d36a0a - ishan - 2019-05-09 19:35:49]
at org.apache.lucene.index.memory.MemoryIndex.addField(MemoryIndex.java:475) ~[lucene-memory-8.1.0.jar:8.1.0 dbe5ed0b2f17677ca6c904ebae919363f2d36a0a - ishan - 2019-05-09 19:35:49]
at org.apache.lucene.index.memory.MemoryIndex.addField(MemoryIndex.java:453) ~[lucene-memory-8.1.0.jar:8.1.0 dbe5ed0b2f17677ca6c904ebae919363f2d36a0a - ishan - 2019-05-09 19:35:49]
at org.apache.lucene.index.memory.MemoryIndex.addField(MemoryIndex.java:432) ~[lucene-memory-8.1.0.jar:8.1.0 dbe5ed0b2f17677ca6c904ebae919363f2d36a0a - ishan - 2019-05-09 19:35:49]
at org.apache.lucene.search.uhighlight.MemoryIndexOffsetStrategy.getOffsetsEnum(MemoryIndexOffsetStrategy.java:98) ~[lucene-highlighter-8.1.0.jar:8.1.0 dbe5ed0b2f17677ca6c904ebae919363f2d36a0a - ishan - 2019-05-09 19:35:48]
at org.apache.lucene.search.uhighlight.FieldHighlighter.highlightFieldForDoc(FieldHighlighter.java:76) ~[lucene-highlighter-8.1.0.jar:8.1.0 dbe5ed0b2f17677ca6c904ebae919363f2d36a0a - ishan - 2019-05-09 19:35:48]
at org.apache.lucene.search.uhighlight.UnifiedHighlighter.highlightFieldsAsObjects(UnifiedHighlighter.java:639) ~[lucene-highlighter-8.1.0.jar:8.1.0 dbe5ed0b2f17677ca6c904ebae919363f2d36a0a - ishan - 2019-05-09 19:35:48]
at org.apache.lucene.search.uhighlight.CustomUnifiedHighlighter.highlightField(CustomUnifiedHighlighter.java:102) ~[elasticsearch-7.3.1.jar:8.1.0 dbe5ed0b2f17677ca6c904ebae919363f2d36a0a - ishan - 2019-05-09 19:35:48]
at org.elasticsearch.search.fetch.subphase.highlight.UnifiedHighlighter.highlight(UnifiedHighlighter.java:118) ~[elasticsearch-7.3.1.jar:7.3.1]
at org.elasticsearch.search.fetch.subphase.highlight.HighlightPhase.hitExecute(HighlightPhase.java:107) ~[elasticsearch-7.3.1.jar:7.3.1]
at org.elasticsearch.search.fetch.FetchPhase.execute(FetchPhase.java:169) ~[elasticsearch-7.3.1.jar:7.3.1]
at org.elasticsearch.search.SearchService.lambda$executeFetchPhase$5(SearchService.java:507) ~[elasticsearch-7.3.1.jar:7.3.1]
at org.elasticsearch.search.SearchService$1.doRun(SearchService.java:347) ~[elasticsearch-7.3.1.jar:7.3.1]
at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) [elasticsearch-7.3.1.jar:7.3.1]
at org.elasticsearch.common.util.concurrent.TimedRunnable.doRun(TimedRunnable.java:44) [elasticsearch-7.3.1.jar:7.3.1]
at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:758) [elasticsearch-7.3.1.jar:7.3.1]
at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) [elasticsearch-7.3.1.jar:7.3.1]
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:835) [?:?]
Can this be fixed? or any workaround?
Thanks in advance