RED-809: Fixed indexing pages multiple times
This commit is contained in:
parent
d0a1a4a8e7
commit
7df41f0d05
@ -1,7 +1,7 @@
|
||||
package com.iqser.red.service.search.v1.server.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import lombok.AccessLevel;
|
||||
import lombok.AllArgsConstructor;
|
||||
@ -18,6 +18,6 @@ public class IndexSection implements Serializable {
|
||||
|
||||
private int sectionNumber;
|
||||
private String text;
|
||||
private List<Integer> pages;
|
||||
private Set<Integer> pages;
|
||||
private String headline;
|
||||
}
|
||||
|
||||
@ -76,7 +76,7 @@ public class DocumentIndexService {
|
||||
return IndexSection.builder()
|
||||
.sectionNumber(sectionText.getSectionNumber())
|
||||
.text(sectionText.getText())
|
||||
.pages(sectionText.getSectionAreas().stream().map(SectionArea::getPage).collect(Collectors.toList()))
|
||||
.pages(sectionText.getSectionAreas().stream().map(SectionArea::getPage).collect(Collectors.toSet()))
|
||||
.headline(sectionText.getHeadline())
|
||||
.build();
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user