RED-3800 - made search service work with apple silicone. Fixed RED-3737

This commit is contained in:
Timo Bejan 2022-04-13 11:30:43 +03:00
parent dc1b2d7797
commit f68c1cd661
5 changed files with 12 additions and 6 deletions

View File

@ -5,7 +5,7 @@
<parent>
<groupId>com.iqser.red</groupId>
<artifactId>platform-docker-dependency</artifactId>
<version>1.1.0</version>
<version>1.2.0</version>
<relativePath />
</parent>
<modelVersion>4.0.0</modelVersion>
@ -42,7 +42,7 @@
<artifactId>docker-maven-plugin</artifactId>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
@ -95,4 +95,4 @@
</plugins>
</pluginManagement>
</build>
</project>
</project>

View File

@ -44,7 +44,7 @@
<groupId>org.sonarsource.scanner.maven</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>3.9.0.2155</version>
</plugin>
</plugin>
<plugin>
<groupId>org.owasp</groupId>
<artifactId>dependency-check-maven</artifactId>

View File

@ -27,6 +27,9 @@ public class MatchedDocument {
private String assignee;
private Map<String, String> fileAttributes;
private String workflowStatus;
private boolean dossierDeleted;
private boolean dossierArchived;
private String fileName;
@Builder.Default
private Map<String, Set<String>> highlights = new HashMap<>();

View File

@ -78,7 +78,7 @@
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>elasticsearch</artifactId>
<version>1.15.3</version>
<version>1.16.3</version>
<scope>test</scope>
</dependency>
<dependency>

View File

@ -233,10 +233,13 @@ public class SearchService {
.assignee((String) hit.getSourceAsMap().get("assignee"))
.fileAttributes(convertFileAttributes(hit.getSourceAsMap().get("fileAttributes")))
.workflowStatus((String) hit.getSourceAsMap().get("workflowStatus"))
.fileName((String) hit.getSourceAsMap().get("fileName"))
.dossierDeleted((Boolean) hit.getSourceAsMap().get("dossierDeleted"))
.dossierArchived((Boolean) hit.getSourceAsMap().get("dossierArchived"))
.highlights(hit.getHighlightFields()
.entrySet()
.stream()
.collect(Collectors.toMap(e -> e.getKey(), e -> Arrays.stream(e.getValue().getFragments())
.collect(Collectors.toMap(Map.Entry::getKey, e -> Arrays.stream(e.getValue().getFragments())
.map(Text::string)
.collect(Collectors.toSet()))))
.matchedTerms(matchesTerms)