Skip to content

Commit

Permalink
Issue #532:
Browse files Browse the repository at this point in the history
- replace subDocTypeFields -> parentDocTypeField
- remove getChildren method invoke
  • Loading branch information
cbianco committed Jul 26, 2023
1 parent 15c5ce9 commit 825cc40
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
import io.smallrye.mutiny.Uni;
import io.vertx.core.json.DecodeException;
import io.vertx.core.json.JsonObject;
import org.apache.commons.lang3.StringUtils;
import org.elasticsearch.common.io.stream.OutputStreamStreamOutput;
import org.elasticsearch.common.xcontent.ToXContent;
import org.elasticsearch.common.xcontent.XContentBuilder;
Expand Down Expand Up @@ -148,7 +147,7 @@ protected void customizeCriteriaBuilder(

docTypeFetch
.fetch(DocType_.docTypeFields, JoinType.LEFT)
.fetch(DocTypeField_.subDocTypeFields, JoinType.LEFT);
.fetch(DocTypeField_.parentDocTypeField, JoinType.LEFT);

expressions.add(
criteriaBuilder.equal(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,9 @@ public static Stream<DocTypeField> getDocTypeFieldsAndChildrenFrom(DocType docTy
return Stream.empty();
}

Stream.Builder<DocTypeField> builder = Stream.builder();

for (DocTypeField docTypeField : docType.getDocTypeFields()) {
builder.accept(docTypeField);
for (DocTypeField docTypeFieldAndChild : docTypeField.getChildren()) {
builder.accept(docTypeFieldAndChild);
}
}

return builder.build();
return docType
.getDocTypeFields()
.stream();

}

Expand Down

0 comments on commit 825cc40

Please sign in to comment.