1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.codelibs.fess.opensearch.user.allcommon;
17
18 import org.apache.lucene.search.TotalHits;
19 import org.dbflute.cbean.result.PagingResultBean;
20 import org.opensearch.action.search.SearchRequestBuilder;
21 import org.opensearch.search.aggregations.Aggregations;
22
23
24
25
26
27 public class EsPagingResultBean<ENTITY> extends PagingResultBean<ENTITY> {
28
29 private static final long serialVersionUID = 1L;
30
31 protected long took;
32 private int totalShards;
33 private int successfulShards;
34 private int failedShards;
35 private TotalHits totalHits;
36 private Aggregations aggregations;
37
38 private SearchRequestBuilder builder;
39
40 public EsPagingResultBean(final SearchRequestBuilder builder) {
41 this.builder = builder;
42 }
43
44 public String getQueryDsl() {
45 return builder.toString();
46 }
47
48 public long getTook() {
49 return took;
50 }
51
52 public void setTook(long took) {
53 this.took = took;
54 }
55
56 public int getTotalShards() {
57 return totalShards;
58 }
59
60 public void setTotalShards(int totalShards) {
61 this.totalShards = totalShards;
62 }
63
64 public int getSuccessfulShards() {
65 return successfulShards;
66 }
67
68 public void setSuccessfulShards(int successfulShards) {
69 this.successfulShards = successfulShards;
70 }
71
72 public int getFailedShards() {
73 return failedShards;
74 }
75
76 public void setFailedShards(int failedShards) {
77 this.failedShards = failedShards;
78 }
79
80 public Aggregations getAggregations() {
81 return aggregations;
82 }
83
84 public void setAggregation(Aggregations aggregations) {
85 this.aggregations = aggregations;
86 }
87
88 public TotalHits getTotalHits() {
89 return totalHits;
90 }
91
92 public void setTotalHits(TotalHits totalHits) {
93 this.totalHits = totalHits;
94 }
95 }