Skip to content

Commit 447cb56

Browse files
committed
Polishing.
Signed-off-by: Youssef Aouichaoui <youssef3wi@icloud.com>
1 parent 4a04fce commit 447cb56

File tree

3 files changed

+22
-44
lines changed

3 files changed

+22
-44
lines changed

src/main/java/org/springframework/data/elasticsearch/core/query/HasChildQuery.java

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -40,34 +40,29 @@ public class HasChildQuery {
4040
* Indicates whether to ignore an unmapped {@link #type} and not return any documents instead of an error.
4141
* Default, this is set to {@code false}.
4242
*/
43-
@Nullable
44-
private final Boolean ignoreUnmapped;
43+
@Nullable private final Boolean ignoreUnmapped;
4544

4645
/**
4746
* The Maximum number of child documents that match the {@link #query} allowed for a returned parent document.
4847
* If the parent document exceeds this limit, it is excluded from the search results.
4948
*/
50-
@Nullable
51-
private final Integer maxChildren;
49+
@Nullable private final Integer maxChildren;
5250

5351
/**
5452
* Minimum number of child documents that match the query required to match the {@link #query} for a returned parent document.
5553
* If the parent document does not meet this limit, it is excluded from the search results.
5654
*/
57-
@Nullable
58-
private final Integer minChildren;
55+
@Nullable private final Integer minChildren;
5956

6057
/**
6158
* Indicates how scores for matching child documents affect the root parent document’s relevance score.
6259
*/
63-
@Nullable
64-
private final ScoreMode scoreMode;
60+
@Nullable private final ScoreMode scoreMode;
6561

6662
/**
6763
* Obtaining nested objects and documents that have a parent-child relationship.
6864
*/
69-
@Nullable
70-
private final InnerHitsQuery innerHitsQuery;
65+
@Nullable private final InnerHitsQuery innerHitsQuery;
7166

7267
public static Builder builder(String type) {
7368
return new Builder(type);
@@ -127,19 +122,14 @@ public static final class Builder {
127122
private final String type;
128123
private Query query;
129124

130-
@Nullable
131-
private Boolean ignoreUnmapped;
125+
@Nullable private Boolean ignoreUnmapped;
132126

133-
@Nullable
134-
private Integer maxChildren;
135-
@Nullable
136-
private Integer minChildren;
127+
@Nullable private Integer maxChildren;
128+
@Nullable private Integer minChildren;
137129

138-
@Nullable
139-
private ScoreMode scoreMode;
130+
@Nullable private ScoreMode scoreMode;
140131

141-
@Nullable
142-
private InnerHitsQuery innerHitsQuery;
132+
@Nullable private InnerHitsQuery innerHitsQuery;
143133

144134
private Builder(String type) {
145135
Assert.notNull(type, "type must not be null");

src/main/java/org/springframework/data/elasticsearch/core/query/HasParentQuery.java

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,21 +40,18 @@ public class HasParentQuery {
4040
* Indicates whether the relevance score of a matching parent document is aggregated into its child documents.
4141
* Default, this is set to {@code false}.
4242
*/
43-
@Nullable
44-
private final Boolean score;
43+
@Nullable private final Boolean score;
4544

4645
/**
4746
* Indicates whether to ignore an unmapped {@link #parentType} and not return any documents instead of an error.
4847
* Default, this is set to {@code false}.
4948
*/
50-
@Nullable
51-
private final Boolean ignoreUnmapped;
49+
@Nullable private final Boolean ignoreUnmapped;
5250

5351
/**
5452
* Obtaining nested objects and documents that have a parent-child relationship.
5553
*/
56-
@Nullable
57-
private final InnerHitsQuery innerHitsQuery;
54+
@Nullable private final InnerHitsQuery innerHitsQuery;
5855

5956
public static Builder builder(String parentType) {
6057
return new Builder(parentType);
@@ -96,13 +93,10 @@ public static class Builder {
9693
private final String parentType;
9794
private Query query;
9895

99-
@Nullable
100-
private Boolean score;
101-
@Nullable
102-
private Boolean ignoreUnmapped;
96+
@Nullable private Boolean score;
97+
@Nullable private Boolean ignoreUnmapped;
10398

104-
@Nullable
105-
private InnerHitsQuery innerHitsQuery;
99+
@Nullable private InnerHitsQuery innerHitsQuery;
106100

107101
private Builder(String parentType) {
108102
Assert.notNull(parentType, "parent_type must not be null.");

src/main/java/org/springframework/data/elasticsearch/core/query/InnerHitsQuery.java

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,20 +28,17 @@ public class InnerHitsQuery {
2828
/**
2929
* The name to be used for the particular inner hit definition in the response.
3030
*/
31-
@Nullable
32-
private final String name;
31+
@Nullable private final String name;
3332

3433
/**
3534
* The maximum number of hits to return.
3635
*/
37-
@Nullable
38-
private final Integer size;
36+
@Nullable private final Integer size;
3937

4038
/**
4139
* The offset from where the first hit to fetch.
4240
*/
43-
@Nullable
44-
private final Integer from;
41+
@Nullable private final Integer from;
4542

4643
public static Builder builder() {
4744
return new Builder();
@@ -70,12 +67,9 @@ public Integer getFrom() {
7067
}
7168

7269
public static final class Builder {
73-
@Nullable
74-
private String name;
75-
@Nullable
76-
private Integer size;
77-
@Nullable
78-
private Integer from;
70+
@Nullable private String name;
71+
@Nullable private Integer size;
72+
@Nullable private Integer from;
7973

8074
private Builder() {
8175
}

0 commit comments

Comments
 (0)