Convert SQL query to Java Elastic Query

(Kedar Dixit) #1

I am using Transport client to query ES. Need to convert below sql query to Java Queries:

SELECT id,max(timestamp2)
FROM table
AVING timestamp1 > "2017-07-13T21:01:00.013Z"

I know TermsQueryBuilder and AggregationBuilder can be used for this one.

But I am unable to get it right can some one please help ?

(Mark Walkom) #2

Given you already have another thread with a bunch of people helping, it's going to be easier to continue the discussion there, as it also has a bit more context :slight_smile:

(Mark Walkom) #3