Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed view template issue for search #342

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ jobs:
- name: Check space before tests
run: df -h
# debug step
- name: Install Docker Compose 1.29.2-1
run: |
curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
docker-compose --version
# - name: Setup upterm session
# uses: lhotari/action-upterm@v1
# with:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,9 @@ private JsonNode searchEntity(JsonNode inputJson, ISearchService service, String
ViewTemplate viewTemplate = viewTemplateManager.getViewTemplate(inputJson);
if (viewTemplate != null) {
ViewTransformer vTransformer = new ViewTransformer();
resultNode.set(ENTITY_LIST, vTransformer.transform(viewTemplate, resultNode.get(ENTITY_LIST)));
String entityName = resultNode.fields().next().getKey();
ObjectNode transformerInput = JsonNodeFactory.instance.objectNode().set(entityName, resultNode.get(entityName).get(ENTITY_LIST));
((ObjectNode) resultNode.get(entityName)).set(ENTITY_LIST, vTransformer.transform(viewTemplate, transformerInput).get(entityName));
}
// Search is tricky to support LD. Needs a revisit here.
logger.debug("searchEntity ends");
Expand Down
Loading