Index Failure exception returns null JAVA API

Hello I'm trying to build an index using elasticsearch java api with java restHighLevelClient, but for some reasons I have an and index failure exception which returns null.

I'll like to know the reason so that I can improve the input data at least.
Thank in advance for the answer.
P.S: the code is below

 private void index(String id,IndexRequest indexRequest){
        restHighLevelClient.indexAsync(indexRequest, new ActionListener<IndexResponse>() {
            public void onResponse(IndexResponse indexResponse) {
                System.out.println("response status: "+ indexResponse.status().toString()+", response: "+ indexResponse.toString());
            public void onFailure(Exception e) {
                String message =  id +" "+e.getMessage();
                System.out.println("index response exception from : " +message);
                try {
                    FileWriter fileWriter = new FileWriter("indexErrors.txt",true);
                    fileWriter.write(message+ "\n");

                } catch (IOException e1) {


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