Here one client method creating problem for me. I went through java api of elastic search but still not getting that client() usage and node usage.
Please help me out.
Here is the syntax.
SearchResponse sr = node.client().prepareSearch()
.addAggregation(
AggregationBuilders.terms("by_country").field("country")
.subAggregation(AggregationBuilders.dateHistogram("by_year")
.field("dateOfBirth")
.dateHistogramInterval(DateHistogramInterval.YEAR)
.subAggregation(AggregationBuilders.avg("avg_children").field("children"))
)
)
.execute().actionGet();
Thank you, I also want to import some JSON file through rest client using bulk API. Unfortunately, I'm unable to do, could you please show me the syntax or something related to it that I can do it.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.