Hi I am using java high level rest api client to read some documents from an elastic search index and i am getting the following error .
I get this error when i do perform a request on elasticsearch client as below.
elasticSearchClient.search(searchRequest, RequestOptions.DEFAULT);
java.lang.IllegalArgumentException: cannot write xcontent for unknown value of type class java.util.UUID
at org.elasticsearch.common.xcontent.XContentBuilder.unknownValue(XContentBuilder.java:833)
at org.elasticsearch.common.xcontent.XContentBuilder.value(XContentBuilder.java:804)
at org.elasticsearch.common.xcontent.XContentBuilder.field(XContentBuilder.java:789)
at org.elasticsearch.index.query.MatchQueryBuilder.doXContent(MatchQueryBuilder.java:371)
at org.elasticsearch.index.query.AbstractQueryBuilder.toXContent(AbstractQueryBuilder.java:88)
at org.elasticsearch.index.query.BoolQueryBuilder.doXArrayContent(BoolQueryBuilder.java:280)
Following is the content of my elastic search index .
{"took":9,"timed_out":false,"_shards":{"total":5,"successful":5,"skipped":0,"failed":0},"hits":{"total":100,"max_score":1.0,"hits":[{"_index":"mep-report-today","_type":"doc","_id":"k33fEW0B6qRb3bOs9s4M","_score":1.0,"_source":{"inventory":"SMS","msg_text":"This is random text","status":"ENROUTE","@timestamp":"2019-09-02T09:48:09.213Z","o_error":"","flight_id":"92348fa1-ca6c-456a-b3b2-85fba2d2deed","recipient":"420736408283","account_id":"a56f7e14-20f9-40e6-90c6-10604140ac5f","sender":"8800111","campaign_id":"6f2abca3-b46d-43f3-91be-3278a8dd7dc0","nof_segments":1,"@version":1,"submission_ts":1567681407000,"delivery_ts":1549246209000}},{"_index":"mep-report-today","_type":"doc","_id":"lH3fEW0B6qRb3bOs9s4M","_score":1.0,"_source":{"inventory":"SMS","msg_text":"This is random text","status":"ENROUTE","@timestamp":"2019-09-02T09:48:09.213Z","o_error":"","flight_id":"92348fa1-ca6c-456a-b3b2-85fba2d2deed","recipient":"420736408283","account_id":"a56f7e14-20f9-40e6-90c6-10604140ac5f","sender":"8800111","campaign_id":"6f2abca3-b46d-43f3-91be-3278a8dd7dc0","nof_segments":1,"@version":1,"submission_ts":1567681407000,"delivery_ts":1549246209000}},{"_index":"mep-report-today","_type":"doc","_id":"n33fEW0B6qRb3bOs9s4M","_score":1.0,"_source":{"inventory":"SMS","msg_text":"This is random text","status":"ENROUTE","@timestamp":"2019-09-02T09:48:09.213Z","o_error":"","flight_id":"92348fa1-ca6c-456a-b3b2-85fba2d2deed","recipient":"420736408283","account_id":"a56f7e14-20f9-40e6-90c6-10604140ac5f","sender":"8800111","campaign_id":"6f2abca3-b46d-43f3-91be-3278a8dd7dc0","nof_segments":1,"@version":1,"submission_ts":1567681407000,"delivery_ts":1549246209000}},{"_index":"mep-report-today","_type":"doc","_id":"oH3fEW0B6qRb3bOs9s4M","_score":1.0,"_source":{"inventory":"SMS","msg_text":"This is random text","status":"ENROUTE","@timestamp":"2019-09-02T09:48:09.213Z","o_error":"","flight_id":"92348fa1-ca6c-456a-b3b2-85fba2d2deed","recipient":"420736408283","account_id":"a56f7e14-20f9-40e6-90c6-10604140ac5f","sender":"8800111","campaign_id":"6f2abca3-b46d-43f3-91be-3278a8dd7dc0","nof_segments":1,"@version":1,"submission_ts":1567681407000,"delivery_ts":1549246209000}},{"_index":"mep-report-today","_type":"doc","_id":"oX3fEW0B6qRb3bOs9s4M","_score":1.0,"_source":{"inventory":"SMS","msg_text":"This is random text","status":"ENROUTE","@timestamp":"2019-09-02T09:48:09.213Z","o_error":"","flight_id":"92348fa1-ca6c-456a-b3b2-85fba2d2deed","recipient":"420736408283","account_id":"a56f7e14-20f9-40e6-90c6-10604140ac5f","sender":"8800111","campaign_id":"6f2abca3-b46d-43f3-91be-3278a8dd7dc0","nof_segments":1,"@version":1,"submission_ts":1567681407000,"delivery_ts":1549246209000}},{"_index":"mep-report-today","_type":"doc","_id":"on3fEW0B6qRb3bOs9s4N","_score":1.0,"_source":{"inventory":"SMS","msg_text":"This is random text","status":"ENROUTE","@timestamp":"2019-09-02T09:48:09.213Z","o_error":"","flight_id":"92348fa1-ca6c-456a-b3b2-85fba2d2deed","recipient":"420736408283","account_id":"a56f7e14-20f9-40e6-90c6-10604140ac5f","sender":"8800111","campaign_id":"6f2abca3-b46d-43f3-91be-3278a8dd7dc0","nof_segments":1,"@version":1,"submission_ts":1567681407000,"delivery_ts":1549246209000}},{"_index":"mep-report-today","_type":"doc","_id":"pH3fEW0B6qRb3bOs9s4N","_score":1.0,"_source":{"inventory":"SMS","msg_text":"This is random text","status":"ENROUTE","@timestamp":"2019-09-02T09:48:09.213Z","o_error":"","flight_id":"92348fa1-ca6c-456a-b3b2-85fba2d2deed","recipient":"420736408283","account_id":"a56f7e14-20f9-40e6-90c6-10604140ac5f","sender":"8800111","campaign_id":"6f2abca3-b46d-43f3-91be-3278a8dd7dc0","nof_segments":1,"@version":1,"submission_ts":1567681407000,"delivery_ts":1549246209000}},{"_index":"mep-report-today","_type":"doc","_id":"rn3fEW0B6qRb3bOs9s4N","_score":1.0,"_source":{"inventory":"SMS","msg_text":"This is random text","status":"ENROUTE","@timestamp":"2019-09-02T09:48:09.213Z","o_error":"","flight_id":"92348fa1-ca6c-456a-b3b2-85fba2d2deed","recipient":"420736408283","account_id":"a56f7e14-20f9-40e6-90c6-10604140ac5f","sender":"8800111","campaign_id":"6f2abca3-b46d-43f3-91be-3278a8dd7dc0","nof_segments":1,"@version":1,"submission_ts":1567681407000,"delivery_ts":1549246209000}},{"_index":"mep-report-today","_type":"doc","_id":"t33fEW0B6qRb3bOs9s4N","_score":1.0,"_source":{"inventory":"SMS","msg_text":"This is random text","status":"ENROUTE","@timestamp":"2019-09-02T09:48:09.213Z","o_error":"","flight_id":"92348fa1-ca6c-456a-b3b2-85fba2d2deed","recipient":"420736408283","account_id":"a56f7e14-20f9-40e6-90c6-10604140ac5f","sender":"8800111","campaign_id":"6f2abca3-b46d-43f3-91be-3278a8dd7dc0","nof_segments":1,"@version":1,"submission_ts":1567681407000,"delivery_ts":1549246209000}},{"_index":"mep-report-today","_type":"doc","_id":"wX3fEW0B6qRb3bOs9s4N","_score":1.0,"_source":{"inventory":"SMS","msg_text":"This is random text","status":"ENROUTE","@timestamp":"2019-09-02T09:48:09.213Z","o_error":"","flight_id":"92348fa1-ca6c-456a-b3b2-85fba2d2deed","recipient":"420736408283","account_id":"a56f7e14-20f9-40e6-90c6-10604140ac5f","sender":"8800111","campaign_id":"6f2abca3-b46d-43f3-91be-3278a8dd7dc0","nof_segments":1,"@version":1,"submission_ts":1567681407000,"delivery_ts":1549246209000}}]}}
any idea what am i doing wrong ?