# Error: 502 Response

**URL:** <https://discuss.elastic.co/t/error-502-response/117806>\
**Category:** Kibana\
**Created:** [January 31, 2018, 12:56pm UTC](https://discuss.elastic.co/t/error-502-response/117806 "2018-01-31T12:56:10Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![john.akash](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/john.akash/32/18707_2.png) [@john.akash](https://discuss.elastic.co/u/john.akash)\
**Post date:** [January 31, 2018, 7:52pm UTC](https://discuss.elastic.co/t/error-502-response/117806/3 "2018-01-31T19:52:25Z")

</div>

Hi @Joe_Fleming,

```
[2018-01-31T14:43:21,812][DEBUG][o.e.a.s.TransportSearchAction] [client-node-b] [88818] Failed to execute fetch phase
org.elasticsearch.transport.RemoteTransportException: [data-node-b][10.65.226.154:9300][indices:data/read/search[phase/fetch/id]]
Caused by: java.lang.IllegalArgumentException: Fielddata is disabled on text fields by default. Set fielddata=true on [apiVersion] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory. Alternatively use a keyword field instead.
	at org.elasticsearch.index.mapper.TextFieldMapper$TextFieldType.fielddataBuilder(TextFieldMapper.java:336) ~[elasticsearch-5.6.0.jar:5.6.0]
	at org.elasticsearch.index.fielddata.IndexFieldDataService.getForField(IndexFieldDataService.java:111) ~[elasticsearch-5.6.0.jar:5.6.0]
	at org.elasticsearch.search.fetch.subphase.DocValueFieldsFetchSubPhase.hitExecute(DocValueFieldsFetchSubPhase.java:64) ~[elasticsearch-5.6.0.jar:5.6.0]
	at org.elasticsearch.search.fetch.FetchPhase.execute(FetchPhase.java:164) ~[elasticsearch-5.6.0.jar:5.6.0]
	at org.elasticsearch.search.SearchService.executeFetchPhase(SearchService.java:426) ~[elasticsearch-5.6.0.jar:5.6.0]
	at org.elasticsearch.action.search.SearchTransportService$12.messageReceived(SearchTransportService.java:403) ~[elasticsearch-5.6.0.jar:5.6.0]
	at org.elasticsearch.action.search.SearchTransportService$12.messageReceived(SearchTransportService.java:400) ~[elasticsearch-5.6.0.jar:5.6.0]
	at org.elasticsearch.transport.RequestHandlerRegistry.processMessageReceived(RequestHandlerRegistry.java:69) ~[elasticsearch-5.6.0.jar:5.6.0]
	at org.elasticsearch.transport.TcpTransport$RequestHandler.doRun(TcpTransport.java:1533) ~[elasticsearch-5.6.0.jar:5.6.0]
	at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:638) ~[elasticsearch-5.6.0.jar:5.6.0]
	at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) ~[elasticsearch-5.6.0.jar:5.6.0]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[?:1.8.0_152]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[?:1.8.0_152]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_152]
[2018-01-31T14:43:21,817][DEBUG][o.e.a.s.TransportSearchAction] [client-node-b] [29180] Failed to execute fetch phase
org.elasticsearch.transport.RemoteTransportException: [data-node-c][192.168.1.100:9300][indices:data/read/search[phase/fetch/id]]
Caused by: java.lang.IllegalArgumentException: Fielddata is disabled on text fields by default. Set fielddata=true on [apiVersion] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory. Alternatively use a keyword field instead.
	at org.elasticsearch.index.mapper.TextFieldMapper$TextFieldType.fielddataBuilder(TextFieldMapper.java:336) ~[elasticsearch-5.6.0.jar:5.6.0]
	at org.elasticsearch.index.fielddata.IndexFieldDataService.getForField(IndexFieldDataService.java:111) ~[elasticsearch-5.6.0.jar:5.6.0]
	at org.elasticsearch.search.fetch.subphase.DocValueFieldsFetchSubPhase.hitExecute(DocValueFieldsFetchSubPhase.java:64) ~[elasticsearch-5.6.0.jar:5.6.0]
	at org.elasticsearch.search.fetch.FetchPhase.execute(FetchPhase.java:164) ~[elasticsearch-5.6.0.jar:5.6.0]
	at org.elasticsearch.search.SearchService.executeFetchPhase(SearchService.java:426) ~[elasticsearch-5.6.0.jar:5.6.0]
	at org.elasticsearch.action.search.SearchTransportService$12.messageReceived(SearchTransportService.java:403) ~[elasticsearch-5.6.0.jar:5.6.0]
	at org.elasticsearch.action.search.SearchTransportService$12.messageReceived(SearchTransportService.java:400) ~[elasticsearch-5.6.0.jar:5.6.0]
	at org.elasticsearch.transport.RequestHandlerRegistry.processMessageReceived(RequestHandlerRegistry.java:69) ~[elasticsearch-5.6.0.jar:5.6.0]
	at org.elasticsearch.transport.TcpTransport$RequestHandler.doRun(TcpTransport.java:1533) ~[elasticsearch-5.6.0.jar:5.6.0]
	at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:638) ~[elasticsearch-5.6.0.jar:5.6.0]
	at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) ~[elasticsearch-5.6.0.jar:5.6.0]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[?:1.8.0_152]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[?:1.8.0_152]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_152]

```

This is the elasticsearch log which we are getting while doing wildcard search.

Could you please provide a guide line to fix this issue?

---

_[View the full topic](https://discuss.elastic.co/t/error-502-response/117806)._
