querydsl

Bucket sort in composite aggregation?

五迷三道 提交于 2020-12-13 03:15:43
问题 How can I do Bucket Sort in composite Aggregation? I need to do Composite Aggregation with Bucket sort. I have tried Sort with aggregation. I have tried composite aggregation. 回答1: I think this question, is in continuation to your previous question, so considered the same use case You need to use Bucket sort aggregation that is a parent pipeline aggregation which sorts the buckets of its parent multi-bucket aggregation. And please refer to this documentation on composite aggregation to know

Sort Aggregation in elastic seach?

流过昼夜 提交于 2020-12-13 03:07:11
问题 I have use case where I need to get all unique user ids from Elasticsearch and it should be sorted by timestamp. What I'm using currently is composite term aggregation with sub aggregation which will return the latest timestamp. (I can't sort it in client side as it slow down the script) Sample data in elastic search { "_index": "logstash-2020.10.29", "_type": "doc", "_id": "L0Urc3UBttS_uoEtubDk", "_version": 1, "_score": null, "_source": { "@version": "1", "@timestamp": "2020-10-29T06:56:00

Sort Aggregation in elastic seach?

Deadly 提交于 2020-12-13 03:06:37
问题 I have use case where I need to get all unique user ids from Elasticsearch and it should be sorted by timestamp. What I'm using currently is composite term aggregation with sub aggregation which will return the latest timestamp. (I can't sort it in client side as it slow down the script) Sample data in elastic search { "_index": "logstash-2020.10.29", "_type": "doc", "_id": "L0Urc3UBttS_uoEtubDk", "_version": 1, "_score": null, "_source": { "@version": "1", "@timestamp": "2020-10-29T06:56:00

Spring-Data-JPA with QueryDslPredicateExecutor and Joining into a collection

狂风中的少年 提交于 2020-11-30 04:30:04
问题 Let's say I have a data model like this (pseudocode): @Entity Person { @OneToMany List<PersonAttribute> attributes; } @Entity PersonAttribute { @ManyToOne AttributeName attributeName; String attributeValue; } @Entity AttributeName { String name; } I have a Spring-Data-JPA repository defined such as: public interface PersonRepository extends PagingAndSortingRepository<Person, Long>, QueryDslPredicateExecutor<Person>{} I see in the QueryDSL documentation that there is a mechanism to Join from