I'm using elasticsearch to save data coming from twitter.
At this point I'm having difficulty deleting data from index and using the Scroll API because after reading about ways to do that, everyone uses the Client and I'm using RestClient.
What I am using:
RestClient restClient = RestClient.builder( new HttpHost("localhost", 9200, "http"), new HttpHost("localhost", 9201, "http")).build();
What I found:
DeleteIndexResponse deleteResponse = client.admin().indices().delete(new DeleteIndexRequest("your-index")).actionGet()
SearchResponse scrollResp = client.prepareSearch(test) .addSort(FieldSortBuilder.DOC_FIELD_NAME, SortOrder.ASC) .setScroll(new TimeValue(60000)) .setQuery(qb) .setSize(100).get();
How do I get the client using RestClient?
Will I have to create Java High Level REST Client?
Using the Transport Client it would be possible to do what I am looking for, but as it will be discontinued / deprecated, I used RestClient .Is it possible to use both?
Thanks and regards