@query elasticsearch spring data to get max id -
i'm trying max , min id @query elasticsearch spring data ,so use following code theis error no query registered [aggs]];
@query(value="{\"aggs\":{\"max_id\":{\"max\":{\"field\":\"id\"}}}}") segment findmaxid();
stack trace
org.elasticsearch.action.search.searchphaseexecutionexception: failed execute phase [dfs], shards failed; shardfailures {[qvvc1wxqrowtkuhgsdulcg][segment][0]: searchparseexception[[segment][0]: from[0],size[10]: parse failure [failed parse source [{"from":0,"size":10,"query_binary": "eyjhz2dzijp7im1hef9pzci6eyjtyxgionsizmllb gqioijpzcj9fx19"}]]]; nested: queryparsingexception[[segment] no query registered [aggs]]; }{[qvvc1wxqrowtkuhgsdulcg][segment][1]: searchparseexception[[segment][1]: from[0],size[10]: parse failure [failed parse source [{"from":0,"size":10,"query_binary": "eyjhz2dzijp7im1hef9pzci6eyjtyxgionsizmllbgqioijpzcj9fx19"}]]]; nested: queryparsingexception[[segment] no query registered [aggs]]; }{[qvvc1wxqrowtkuhgsdulcg][segment][2]: searchparseexception[[segment][2]: from[0],size[10]: parse failure [failed parse source
Comments
Post a Comment